Compare commits
20 Commits
Author | SHA1 | Date |
---|---|---|
Oliver Smith | 1ffb0b7abd | |
Neels Hofmeyr | a46a126fb1 | |
Neels Hofmeyr | 5d2ee7e72c | |
Neels Hofmeyr | 172dc5a72d | |
Harald Welte | da1796678c | |
Pau Espin | 34220e80a8 | |
Harald Welte | d497660ac6 | |
Oliver Smith | 934b2ceefd | |
Neels Hofmeyr | b939974355 | |
Neels Hofmeyr | e6ff99d7ac | |
Neels Hofmeyr | 761e17039a | |
Neels Hofmeyr | d116902c7d | |
Neels Hofmeyr | b97f9e1906 | |
Neels Hofmeyr | 1aa3a0889c | |
Neels Hofmeyr | e2f94c2b57 | |
Neels Hofmeyr | eeba253ccd | |
Neels Hofmeyr | a2a8f56513 | |
Oliver Smith | a2154c7350 | |
Neels Hofmeyr | abf1d43e5e | |
Neels Hofmeyr | c518e3fa06 |
|
@ -0,0 +1,339 @@
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 2, June 1991
|
||||||
|
|
||||||
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
License is intended to guarantee your freedom to share and change free
|
||||||
|
software--to make sure the software is free for all its users. This
|
||||||
|
General Public License applies to most of the Free Software
|
||||||
|
Foundation's software and to any other program whose authors commit to
|
||||||
|
using it. (Some other Free Software Foundation software is covered by
|
||||||
|
the GNU Lesser General Public License instead.) You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
this service if you wish), that you receive source code or can get it
|
||||||
|
if you want it, that you can change the software or use pieces of it
|
||||||
|
in new free programs; and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
anyone to deny you these rights or to ask you to surrender the rights.
|
||||||
|
These restrictions translate to certain responsibilities for you if you
|
||||||
|
distribute copies of the software, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must give the recipients all the rights that
|
||||||
|
you have. You must make sure that they, too, receive or can get the
|
||||||
|
source code. And you must show them these terms so they know their
|
||||||
|
rights.
|
||||||
|
|
||||||
|
We protect your rights with two steps: (1) copyright the software, and
|
||||||
|
(2) offer you this license which gives you legal permission to copy,
|
||||||
|
distribute and/or modify the software.
|
||||||
|
|
||||||
|
Also, for each author's protection and ours, we want to make certain
|
||||||
|
that everyone understands that there is no warranty for this free
|
||||||
|
software. If the software is modified by someone else and passed on, we
|
||||||
|
want its recipients to know that what they have is not the original, so
|
||||||
|
that any problems introduced by others will not reflect on the original
|
||||||
|
authors' reputations.
|
||||||
|
|
||||||
|
Finally, any free program is threatened constantly by software
|
||||||
|
patents. We wish to avoid the danger that redistributors of a free
|
||||||
|
program will individually obtain patent licenses, in effect making the
|
||||||
|
program proprietary. To prevent this, we have made it clear that any
|
||||||
|
patent must be licensed for everyone's free use or not licensed at all.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License applies to any program or other work which contains
|
||||||
|
a notice placed by the copyright holder saying it may be distributed
|
||||||
|
under the terms of this General Public License. The "Program", below,
|
||||||
|
refers to any such program or work, and a "work based on the Program"
|
||||||
|
means either the Program or any derivative work under copyright law:
|
||||||
|
that is to say, a work containing the Program or a portion of it,
|
||||||
|
either verbatim or with modifications and/or translated into another
|
||||||
|
language. (Hereinafter, translation is included without limitation in
|
||||||
|
the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running the Program is not restricted, and the output from the Program
|
||||||
|
is covered only if its contents constitute a work based on the
|
||||||
|
Program (independent of having been made by running the Program).
|
||||||
|
Whether that is true depends on what the Program does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Program's
|
||||||
|
source code as you receive it, in any medium, provided that you
|
||||||
|
conspicuously and appropriately publish on each copy an appropriate
|
||||||
|
copyright notice and disclaimer of warranty; keep intact all the
|
||||||
|
notices that refer to this License and to the absence of any warranty;
|
||||||
|
and give any other recipients of the Program a copy of this License
|
||||||
|
along with the Program.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy, and
|
||||||
|
you may at your option offer warranty protection in exchange for a fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Program or any portion
|
||||||
|
of it, thus forming a work based on the Program, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) You must cause the modified files to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
b) You must cause any work that you distribute or publish, that in
|
||||||
|
whole or in part contains or is derived from the Program or any
|
||||||
|
part thereof, to be licensed as a whole at no charge to all third
|
||||||
|
parties under the terms of this License.
|
||||||
|
|
||||||
|
c) If the modified program normally reads commands interactively
|
||||||
|
when run, you must cause it, when started running for such
|
||||||
|
interactive use in the most ordinary way, to print or display an
|
||||||
|
announcement including an appropriate copyright notice and a
|
||||||
|
notice that there is no warranty (or else, saying that you provide
|
||||||
|
a warranty) and that users may redistribute the program under
|
||||||
|
these conditions, and telling the user how to view a copy of this
|
||||||
|
License. (Exception: if the Program itself is interactive but
|
||||||
|
does not normally print such an announcement, your work based on
|
||||||
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Program,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Program, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Program.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Program
|
||||||
|
with the Program (or with a work based on the Program) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may copy and distribute the Program (or a work based on it,
|
||||||
|
under Section 2) in object code or executable form under the terms of
|
||||||
|
Sections 1 and 2 above provided that you also do one of the following:
|
||||||
|
|
||||||
|
a) Accompany it with the complete corresponding machine-readable
|
||||||
|
source code, which must be distributed under the terms of Sections
|
||||||
|
1 and 2 above on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
|
b) Accompany it with a written offer, valid for at least three
|
||||||
|
years, to give any third party, for a charge no more than your
|
||||||
|
cost of physically performing source distribution, a complete
|
||||||
|
machine-readable copy of the corresponding source code, to be
|
||||||
|
distributed under the terms of Sections 1 and 2 above on a medium
|
||||||
|
customarily used for software interchange; or,
|
||||||
|
|
||||||
|
c) Accompany it with the information you received as to the offer
|
||||||
|
to distribute corresponding source code. (This alternative is
|
||||||
|
allowed only for noncommercial distribution and only if you
|
||||||
|
received the program in object code or executable form with such
|
||||||
|
an offer, in accord with Subsection b above.)
|
||||||
|
|
||||||
|
The source code for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For an executable work, complete source
|
||||||
|
code means all the source code for all modules it contains, plus any
|
||||||
|
associated interface definition files, plus the scripts used to
|
||||||
|
control compilation and installation of the executable. However, as a
|
||||||
|
special exception, the source code distributed need not include
|
||||||
|
anything that is normally distributed (in either source or binary
|
||||||
|
form) with the major components (compiler, kernel, and so on) of the
|
||||||
|
operating system on which the executable runs, unless that component
|
||||||
|
itself accompanies the executable.
|
||||||
|
|
||||||
|
If distribution of executable or object code is made by offering
|
||||||
|
access to copy from a designated place, then offering equivalent
|
||||||
|
access to copy the source code from the same place counts as
|
||||||
|
distribution of the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
|
except as expressly provided under this License. Any attempt
|
||||||
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
|
void, and will automatically terminate your rights under this License.
|
||||||
|
However, parties who have received copies, or rights, from you under
|
||||||
|
this License will not have their licenses terminated so long as such
|
||||||
|
parties remain in full compliance.
|
||||||
|
|
||||||
|
5. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Program or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Program (or any work based on the
|
||||||
|
Program), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Program or works based on it.
|
||||||
|
|
||||||
|
6. Each time you redistribute the Program (or any work based on the
|
||||||
|
Program), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute or modify the Program subject to
|
||||||
|
these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties to
|
||||||
|
this License.
|
||||||
|
|
||||||
|
7. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Program at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Program by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Program.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under
|
||||||
|
any particular circumstance, the balance of the section is intended to
|
||||||
|
apply and the section as a whole is intended to apply in other
|
||||||
|
circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system, which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Program under this License
|
||||||
|
may add an explicit geographical distribution limitation excluding
|
||||||
|
those countries, so that distribution is permitted only in or among
|
||||||
|
countries not thus excluded. In such case, this License incorporates
|
||||||
|
the limitation as if written in the body of this License.
|
||||||
|
|
||||||
|
9. The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Program
|
||||||
|
specifies a version number of this License which applies to it and "any
|
||||||
|
later version", you have the option of following the terms and conditions
|
||||||
|
either of that version or of any later version published by the Free
|
||||||
|
Software Foundation. If the Program does not specify a version number of
|
||||||
|
this License, you may choose any version ever published by the Free Software
|
||||||
|
Foundation.
|
||||||
|
|
||||||
|
10. If you wish to incorporate parts of the Program into other free
|
||||||
|
programs whose distribution conditions are different, write to the author
|
||||||
|
to ask for permission. For software which is copyrighted by the Free
|
||||||
|
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||||
|
make exceptions for this. Our decision will be guided by the two goals
|
||||||
|
of preserving the free status of all derivatives of our free software and
|
||||||
|
of promoting the sharing and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||||
|
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||||
|
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||||
|
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||||
|
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||||
|
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||||
|
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||||
|
REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||||
|
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||||
|
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||||
|
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||||
|
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||||
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along
|
||||||
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program is interactive, make it output a short notice like this
|
||||||
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
|
Gnomovision version 69, Copyright (C) year name of author
|
||||||
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, the commands you use may
|
||||||
|
be called something other than `show w' and `show c'; they could even be
|
||||||
|
mouse-clicks or menu items--whatever suits your program.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||||
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1989
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
This General Public License does not permit incorporating your program into
|
||||||
|
proprietary programs. If your program is a subroutine library, you may
|
||||||
|
consider it more useful to permit linking proprietary applications with the
|
||||||
|
library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License.
|
|
@ -4,7 +4,6 @@ AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6
|
||||||
## remove line below when OE toolchain is updated to version which include those
|
## remove line below when OE toolchain is updated to version which include those
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
$(all_includes) \
|
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
@ -25,7 +24,6 @@ pkgconfig_DATA = \
|
||||||
BUILT_SOURCES = $(top_srcdir)/.version
|
BUILT_SOURCES = $(top_srcdir)/.version
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
.version \
|
.version \
|
||||||
contrib/libosmo-pfcp.spec.in \
|
|
||||||
debian \
|
debian \
|
||||||
git-version-gen \
|
git-version-gen \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
|
@ -37,8 +37,8 @@ fi
|
||||||
PKG_PROG_PKG_CONFIG([0.20])
|
PKG_PROG_PKG_CONFIG([0.20])
|
||||||
|
|
||||||
dnl checks for libraries
|
dnl checks for libraries
|
||||||
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.8.0)
|
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.9.0)
|
||||||
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.8.0)
|
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.9.0)
|
||||||
|
|
||||||
dnl checks for header files
|
dnl checks for header files
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
|
@ -85,7 +85,6 @@ AM_CONFIG_HEADER(config.h)
|
||||||
AC_CONFIG_FILES([
|
AC_CONFIG_FILES([
|
||||||
libosmo-gtlv.pc
|
libosmo-gtlv.pc
|
||||||
libosmo-pfcp.pc
|
libosmo-pfcp.pc
|
||||||
contrib/libosmo-pfcp.spec
|
|
||||||
include/Makefile
|
include/Makefile
|
||||||
include/osmocom/Makefile
|
include/osmocom/Makefile
|
||||||
include/osmocom/gtlv/Makefile
|
include/osmocom/gtlv/Makefile
|
||||||
|
|
|
@ -1,112 +0,0 @@
|
||||||
Name: libosmo-pfcp
|
|
||||||
Version: @VERSION@
|
|
||||||
Release: 0
|
|
||||||
Summary: PFCP protocol encoding, decoding and endpoint implementation
|
|
||||||
License: AGPL-3.0-or-later AND GPL-2.0-or-later
|
|
||||||
Group: Hardware/Mobile
|
|
||||||
URL: https://osmocom.org/projects/libosmo-pfcp
|
|
||||||
Source: %{name}-%{version}.tar.xz
|
|
||||||
BuildRequires: autoconf-archive
|
|
||||||
BuildRequires: automake >= 1.9
|
|
||||||
BuildRequires: libtool >= 2
|
|
||||||
BuildRequires: lksctp-tools-devel
|
|
||||||
BuildRequires: pkgconfig >= 0.20
|
|
||||||
BuildRequires: pkgconfig(libosmocore) >= 1.8.0
|
|
||||||
BuildRequires: pkgconfig(libosmogsm) >= 1.8.0
|
|
||||||
BuildRequires: pkgconfig(talloc)
|
|
||||||
|
|
||||||
%description
|
|
||||||
Description: Osmocom PFCP protocol implementation (metapackage)
|
|
||||||
|
|
||||||
Install Osmocom PFCP and generic TLV protocol libraries.
|
|
||||||
libosmo-gtlv and libosmo-pfcp
|
|
||||||
|
|
||||||
|
|
||||||
%package -n libosmo-gtlv1
|
|
||||||
Summary: Generic TLV and TLIV protocol support
|
|
||||||
License: GPL-2.0-or-later AND AGPL-3.0-or-later
|
|
||||||
Group: System/Libraries
|
|
||||||
|
|
||||||
%description -n libosmo-gtlv1
|
|
||||||
Decoding, encoding and logging of protocols using a Tag-Length-Value and/or
|
|
||||||
Tag-Length-Instance-Value structure.
|
|
||||||
|
|
||||||
|
|
||||||
%package -n libosmo-gtlv-devel
|
|
||||||
Summary: Development files for libosmo-pfcp
|
|
||||||
License: GPL-2.0-or-later
|
|
||||||
Group: Development/Libraries/C and C++
|
|
||||||
Requires: libosmo-gtlv1 = %{version}
|
|
||||||
|
|
||||||
%description -n libosmo-gtlv-devel
|
|
||||||
libosmo-pfcp implements decoding, encoding and endpoint implementation of the
|
|
||||||
Packet Forwarding Control Protocol (3GPP TS 29.244). This package in particular
|
|
||||||
contains the files for compiling a program using this library.
|
|
||||||
|
|
||||||
|
|
||||||
%package -n libosmo-pfcp0
|
|
||||||
Summary: PFCP protocol support
|
|
||||||
License: GPL-2.0-or-later AND AGPL-3.0-or-later
|
|
||||||
Group: System/Libraries
|
|
||||||
|
|
||||||
%description -n libosmo-pfcp0
|
|
||||||
PFCP protocol support: Decoding, encoding and endpoint implementation of the
|
|
||||||
Packet Forwarding Control Protocol (3GPP TS 29.244).
|
|
||||||
|
|
||||||
|
|
||||||
%package -n libosmo-pfcp-devel
|
|
||||||
Summary: Development files for libosmo-pfcp
|
|
||||||
License: GPL-2.0-or-later
|
|
||||||
Group: Development/Libraries/C and C++
|
|
||||||
Requires: libosmo-pfcp0 = %{version}
|
|
||||||
|
|
||||||
%description -n libosmo-pfcp-devel
|
|
||||||
libosmo-pfcp implements decoding, encoding and endpoint implementation of the
|
|
||||||
Packet Forwarding Control Protocol (3GPP TS 29.244). This package in particular
|
|
||||||
contains the files for compiling a program using this library.
|
|
||||||
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%setup -q
|
|
||||||
|
|
||||||
%build
|
|
||||||
echo "%{version}" >.tarball-version
|
|
||||||
autoreconf -fi
|
|
||||||
%configure \
|
|
||||||
--disable-static \
|
|
||||||
--includedir="%_includedir/%name"
|
|
||||||
make %{?_smp_mflags}
|
|
||||||
|
|
||||||
%install
|
|
||||||
%make_install
|
|
||||||
find %{buildroot} -type f -name "*.la" -delete -print
|
|
||||||
|
|
||||||
%check
|
|
||||||
make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
|
|
||||||
|
|
||||||
%post -n libosmo-gtlv1 -p /sbin/ldconfig
|
|
||||||
%postun -n libosmo-gtlv1 -p /sbin/ldconfig
|
|
||||||
%post -n libosmo-pfcp0 -p /sbin/ldconfig
|
|
||||||
%postun -n libosmo-pfcp0 -p /sbin/ldconfig
|
|
||||||
|
|
||||||
%files -n libosmo-gtlv1
|
|
||||||
%{_libdir}/libosmo-gtlv.so.1*
|
|
||||||
|
|
||||||
%files -n libosmo-gtlv-devel
|
|
||||||
%dir %{_includedir}/%{name}
|
|
||||||
%dir %{_includedir}/%{name}/osmocom
|
|
||||||
%{_includedir}/%{name}/osmocom/gtlv
|
|
||||||
%{_libdir}/libosmo-gtlv.so
|
|
||||||
%{_libdir}/pkgconfig/libosmo-gtlv.pc
|
|
||||||
|
|
||||||
%files -n libosmo-pfcp0
|
|
||||||
%{_libdir}/libosmo-pfcp.so.0*
|
|
||||||
|
|
||||||
%files -n libosmo-pfcp-devel
|
|
||||||
%dir %{_includedir}/%{name}
|
|
||||||
%dir %{_includedir}/%{name}/osmocom
|
|
||||||
%{_includedir}/%{name}/osmocom/pfcp
|
|
||||||
%{_libdir}/libosmo-pfcp.so
|
|
||||||
%{_libdir}/pkgconfig/libosmo-pfcp.pc
|
|
||||||
|
|
||||||
%changelog
|
|
|
@ -1,3 +1,27 @@
|
||||||
|
libosmo-pfcp (0.3.0) unstable; urgency=medium
|
||||||
|
|
||||||
|
[ Neels Janosch Hofmeyr ]
|
||||||
|
* clarify API doc for osmo_pfcp_endpoint_tx()
|
||||||
|
* add doc/charts/pfcp_msgs*.msc
|
||||||
|
* libosmo-pfcp.pc.in: add missing libosmogsm
|
||||||
|
* build: drop COVERAGE
|
||||||
|
* build: drop $(all_includes)
|
||||||
|
* build: drop LIBOSMOVTY from libosmo-pfcp
|
||||||
|
* build: libosmo-gtlv: move LIBS to libosmo_gtlv_la_LIBADD
|
||||||
|
* build: fix linking gen__pfcp_ies_auto to use build-tree libosmo-gtlv
|
||||||
|
* build: add gen__pfcp_ies_auto_LDFLAGS = -no-install
|
||||||
|
* pfcp_msg: refactor LOG_PFCP_MSG
|
||||||
|
* coverity: fix null deref
|
||||||
|
|
||||||
|
[ Oliver Smith ]
|
||||||
|
* Run struct_endianness.py
|
||||||
|
* debian: make consistent
|
||||||
|
|
||||||
|
[ Harald Welte ]
|
||||||
|
* Fix license information in dpkg + rpm packages: GPLv2+ and not AGPLv3+
|
||||||
|
|
||||||
|
-- Pau Espin Pedrol <pespin@sysmocom.de> Tue, 12 Sep 2023 13:55:22 +0200
|
||||||
|
|
||||||
libosmo-pfcp (0.2.0) unstable; urgency=medium
|
libosmo-pfcp (0.2.0) unstable; urgency=medium
|
||||||
|
|
||||||
[ Neels Hofmeyr ]
|
[ Neels Hofmeyr ]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Source: libosmo-pfcp
|
Source: libosmo-pfcp
|
||||||
Section: libs
|
Section: libs
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Osmocom team <osmocom-net-gprs@lists.osmocom.org>
|
Maintainer: Osmocom team <openbsc@lists.osmocom.org>
|
||||||
Build-Depends: debhelper (>=10),
|
Build-Depends: debhelper (>= 10),
|
||||||
dh-autoreconf,
|
dh-autoreconf,
|
||||||
autotools-dev,
|
autotools-dev,
|
||||||
autoconf,
|
autoconf,
|
||||||
|
@ -10,7 +10,7 @@ Build-Depends: debhelper (>=10),
|
||||||
automake,
|
automake,
|
||||||
libtool,
|
libtool,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
libosmocore-dev (>= 1.8.0),
|
libosmocore-dev (>= 1.9.0),
|
||||||
libtalloc-dev (>= 2.1.0)
|
libtalloc-dev (>= 2.1.0)
|
||||||
Standards-Version: 3.9.8
|
Standards-Version: 3.9.8
|
||||||
Vcs-Git: https://gitea.osmocom.org/osmocom/libosmo-pfcp
|
Vcs-Git: https://gitea.osmocom.org/osmocom/libosmo-pfcp
|
||||||
|
@ -44,7 +44,7 @@ Multi-Arch: same
|
||||||
Section: libdevel
|
Section: libdevel
|
||||||
Depends: ${misc:Depends},
|
Depends: ${misc:Depends},
|
||||||
libosmo-gtlv1 (= ${binary:Version}),
|
libosmo-gtlv1 (= ${binary:Version}),
|
||||||
libosmocore-dev (>= 1.8.0),
|
libosmocore-dev (>= 1.9.0),
|
||||||
libtalloc-dev (>= 2.1.0)
|
libtalloc-dev (>= 2.1.0)
|
||||||
Description: Development files for libosmo-gtlv
|
Description: Development files for libosmo-gtlv
|
||||||
libosmo-gtlv implements decoding, encoding and logging of protocols using a
|
libosmo-gtlv implements decoding, encoding and logging of protocols using a
|
||||||
|
|
|
@ -4,16 +4,16 @@ Source: https://gitea.osmocom.org/osmocom/libosmo-pfcp
|
||||||
|
|
||||||
Files: *
|
Files: *
|
||||||
Copyright: 2022 sysmocom - s.f.m.c. GmbH <info@sysmocom.de>
|
Copyright: 2022 sysmocom - s.f.m.c. GmbH <info@sysmocom.de>
|
||||||
License: AGPL-3.0+
|
License: GPL-2.0+
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU Affero General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 3 of the License, or
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
.
|
.
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU Affero General Public License for more details.
|
GNU General Public License for more details.
|
||||||
.
|
.
|
||||||
You should have received a copy of the GNU Affero General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
|
@ -0,0 +1,60 @@
|
||||||
|
msc {
|
||||||
|
hscale="1";
|
||||||
|
upf[label="User Plane function"],cpf[label="Control Plane function"];
|
||||||
|
|
||||||
|
cpf rbox cpf [label="Look up UPF,\npick any one of the available\nIP addrs for the UPF"];
|
||||||
|
|
||||||
|
...;
|
||||||
|
upf abox cpf [label="not yet associated"];
|
||||||
|
upf rbox cpf [label="reject any session related msgs"];
|
||||||
|
...;
|
||||||
|
|
||||||
|
upf <<= cpf [label="PFCP Association Setup Request\nCP function Node Id, features"];
|
||||||
|
upf =>> cpf [label="PFCP Association Setup Response\nUP function Node Id, features"];
|
||||||
|
upf abox cpf [label="associated"];
|
||||||
|
upf rbox cpf [label="start Heartbeat checking"];
|
||||||
|
...;
|
||||||
|
upf <<= cpf [label="Heartbeat Request"];
|
||||||
|
upf =>> cpf [label="Heartbeat Response"];
|
||||||
|
...;
|
||||||
|
upf =>> cpf [label="Heartbeat Request"];
|
||||||
|
upf <<= cpf [label="Heartbeat Response"];
|
||||||
|
...;
|
||||||
|
|
||||||
|
upf <<= cpf [label="Session Establishment Request\nCP Node-Id\nCP F-SEID\n1+ Packet Detection Rule(s)\n1+ Forward Action Rule(s)"];
|
||||||
|
upf =>> cpf [label="Session Establishment Response"];
|
||||||
|
|
||||||
|
upf <<= cpf [label="Session Modification Request"];
|
||||||
|
upf =>> cpf [label="Session Modification Response"];
|
||||||
|
|
||||||
|
upf <<= cpf [label="Session Deletion Request"];
|
||||||
|
upf =>> cpf [label="Session Deletion Response"];
|
||||||
|
|
||||||
|
...;
|
||||||
|
upf rbox cpf [label="F-SEID: accept any other IP addrs than peer's Node Id"];
|
||||||
|
...;
|
||||||
|
|
||||||
|
--- [label="Graceful release initiated by CP"];
|
||||||
|
|
||||||
|
upf <<= cpf [label="Association Update Request\nwith PFCP Association Release Preparation Start = 1"];
|
||||||
|
upf =>> cpf [label="Association Update Response"];
|
||||||
|
upf =>> cpf [label="Session Report Request\nto report non-zero usage reports,\nat least one message per PFCP Session"];
|
||||||
|
upf <<= cpf [label="Association Release Request"];
|
||||||
|
upf =>> cpf [label="Association Release Response"];
|
||||||
|
|
||||||
|
--- [label="Graceful release initiated by UP"];
|
||||||
|
|
||||||
|
upf =>> cpf [label="Association Update Request\nwith PFCP Association Release Preparation = 1"];
|
||||||
|
cpf abox cpf [label="refrain from establishing sessions"];
|
||||||
|
upf <<= cpf [label="Association Update Response"];
|
||||||
|
upf <<= cpf [label="Session Deletion Request(s)\nto collect usage reports\nper session"];
|
||||||
|
upf =>> cpf [label="Session Deletion Response(s)"];
|
||||||
|
cpf rbox cpf [label="wait Graceful Release Period"];
|
||||||
|
upf <<= cpf [label="Association Release Request"];
|
||||||
|
upf =>> cpf [label="Association Release Response"];
|
||||||
|
|
||||||
|
--- [label="Release (immediate)"];
|
||||||
|
|
||||||
|
upf <<= cpf [label="Association Release Request"];
|
||||||
|
upf =>> cpf [label="Association Release Response"];
|
||||||
|
}
|
|
@ -0,0 +1,91 @@
|
||||||
|
msc {
|
||||||
|
hscale="1";
|
||||||
|
sgsn[label="SGSN\n123.44.0.9"],sgwc[label="SGW-C\n123.44.0.5"],sgwu[label="SGW-U\n123.44.0.6"],pgwc[label="PGW-C\n123.44.0.7"],pgwu[label="PGW-U\n123.44.0.8"];
|
||||||
|
|
||||||
|
sgsn <=> sgwc [label="S4-C GTPv2-C"];
|
||||||
|
sgwc <=> sgwu [label="Sxa PFCP"];
|
||||||
|
sgsn <=> sgwu [label="S4-U GTPv1-U"];
|
||||||
|
sgwc <=> pgwc [label="S5-C GTPv2-C"];
|
||||||
|
pgwc <=> pgwu [label="Sxb PFCP"];
|
||||||
|
sgwu <=> pgwu [label="S5-U GTPv1-U"];
|
||||||
|
|
||||||
|
...;
|
||||||
|
|
||||||
|
sgsn => sgwc [label="GTP Create Session Request"];
|
||||||
|
sgsn note sgwc [label="F-TEID S11 = 123.44.0.9,0x004\nF-TEID S5 = 123.44.0.7,0x000\nPDN addr alloc = IPv4 192.168.100.2"];
|
||||||
|
|
||||||
|
|||;
|
||||||
|
|||;
|
||||||
|
|
||||||
|
sgwc => sgwu [label="PFCP Session Establishment Request"];
|
||||||
|
sgwc note sgwu [label="2x Create PDR\nF-TEID = CHOOSE\nFAR = NOCP,BUFF"];
|
||||||
|
|
||||||
|
|||;
|
||||||
|
|||;
|
||||||
|
|
||||||
|
sgwc <= sgwu [label="PFCP Session Establishment Response"];
|
||||||
|
sgwc note sgwu [label="Created PDR F-TEID 123.44.0.6,0x015\nCreated PDR F-TEID 123.44.0.6,0x016"];
|
||||||
|
|
||||||
|
|||;
|
||||||
|
|||;
|
||||||
|
|
||||||
|
sgwc => pgwc [label="GTP Create Session Request"];
|
||||||
|
sgwc note pgwc [label="F-TEID S5 = 123.44.0.5,0x00b\nPDN addr alloc = IPv4 192.168.100.2\nBearer Ctx: F-TEID S5 = 123.44.0.6,0x015"];
|
||||||
|
|
||||||
|
|||;
|
||||||
|
|||;
|
||||||
|
|
||||||
|
pgwc => pgwu [label="PFCP Session Establishment Request"];
|
||||||
|
pgwc note pgwu [label="Create PDR 1:\nPDI: src-iface Core, UE IPv4 192.168.100.2\nFAR-1: FORW, dst-iface Access,\nhdr creation: GTP-U 123.44.0.6,0x015\n\nCreate PDR 2:\nPDI: src-iface Access, F-TEID = CHOOSE id:05\nhdr removal: GTP-U\nFAR-2: FORW, dst-iface Core\n\nCreate PDR 3:\nPDI: src-iface CP-function, F-TEID = CHOOSE\nhdr removal: GTP-U\nFAR-1\n\nCreate PDR 4:\nPDI: src-iface Access, F-TEID = CHOOSE id:05, SDF Filter\nhdr removal: GTP-U\nFAR-3: FORW, dst-iface CP-Function,\nhdr creation: GTP-U 123.44.0.7,0x00b"];
|
||||||
|
|
||||||
|
|||;
|
||||||
|
|
||||||
|
pgwc <= pgwu [label="PFCP Session Establishment Response"];
|
||||||
|
pgwc note pgwu [label="Created PDR-1\nCreated PDR-2: F-TEID = 123.44.0.8,0x01e\nCreated PDR-3: F-TEID = 123.44.0.8,0x01f\nCreated PDR-4: F-TEID = 123.44.0.8,0x01e"];
|
||||||
|
|
||||||
|
|||;
|
||||||
|
|||;
|
||||||
|
|
||||||
|
sgwc <= pgwc [label="GTP Create Session Response"];
|
||||||
|
sgwc note pgwc [label="TEID: 0x00b\nF-TEID: 123.44.0.7,0x00b\nPDN Addr: 192.168.100.2\nBearer Ctx: F-TEID S5 123.44.0.8,0x01e"];
|
||||||
|
|
||||||
|
|||;
|
||||||
|
|||;
|
||||||
|
|
||||||
|
sgwc => sgwu [label="PFCP Session Modification Request"];
|
||||||
|
sgwc note sgwu [label="Update FAR-2: FORW, dst-iface Core,\nhdr creation GTP-U 123.44.0.8,0x01e"];
|
||||||
|
|
||||||
|
|||;
|
||||||
|
|
||||||
|
sgwc <= sgwu [label="PFCP Session Modification Response"];
|
||||||
|
|
||||||
|
|||;
|
||||||
|
|||;
|
||||||
|
|
||||||
|
sgsn <= sgwc [label="GTP Create Session Response"];
|
||||||
|
sgsn note sgwc [label="TEID: 0x004\nF-TEID S11/S4: 123.44.0.5,0x007\nF-TEID S5/S8: 123.44.0.7,0x00b\nPDN Addr: 192.168.100.2\nBearer Ctx:\nF-TEID S1-U: 123.44.0.6,0x016\nF-TEID S5/S8: 123.44.0.8,0x01e"];
|
||||||
|
|
||||||
|
|||;
|
||||||
|
|||;
|
||||||
|
|
||||||
|
sgsn => sgwc [label="GTP Modify Bearer Request"];
|
||||||
|
sgsn note sgwc [label="TEID: 0x007\nBearer Ctx:\nF-TEID S1-U: 192.168.104.167,0x32adb2ad"];
|
||||||
|
|
||||||
|
|||;
|
||||||
|
|||;
|
||||||
|
|
||||||
|
sgwc => sgwu [label="PFCP Session Modification Request"];
|
||||||
|
sgwc note sgwu [label="Update FAR-1: FORW, dst-iface Access,\nhdr creation: GTP-U 192.168.104.167,0x32adb2ad"];
|
||||||
|
|
||||||
|
|||;
|
||||||
|
|||;
|
||||||
|
|
||||||
|
|
||||||
|
sgwc <= sgwu [label="PFCP Session Modification Response"];
|
||||||
|
|
||||||
|
|||;
|
||||||
|
|
||||||
|
sgsn <= sgwc [label="GTP Modify Bearer Response"];
|
||||||
|
sgsn note sgwc [label="TEID: 0x004\nBearer Ctx:\nF-TEID S1-U: 192.168.104.167,0x32adb2ad"];
|
||||||
|
|
||||||
|
}
|
|
@ -62,9 +62,9 @@ struct osmo_gtlv_cfg {
|
||||||
size_t tl_min_size;
|
size_t tl_min_size;
|
||||||
|
|
||||||
/*! Read one TL from the start of src_data.
|
/*! Read one TL from the start of src_data.
|
||||||
* \param gtlv Return the T (tag) value read from src_data in gtlv->tag.
|
* \param gtlv Return the T (tag) value read from src_data in gtlv->ti.tag.
|
||||||
* Return the L (length) value read from src_data in gtlv->len.
|
* Return the L (length) value read from src_data in gtlv->len.
|
||||||
* Return the I (instance) value read from src_data in gtlv->len; ignore if there is no I.
|
* Return the I (instance) value read from src_data in gtlv->ti.instance; ignore if there is no I.
|
||||||
* Return the position just after the TL in gtlv->*val. If there is V data, point at the start of the
|
* Return the position just after the TL in gtlv->*val. If there is V data, point at the start of the
|
||||||
* V data in src_data. If there is no V data, point at the byte just after the TL part in src_data.
|
* V data in src_data. If there is no V data, point at the byte just after the TL part in src_data.
|
||||||
* \param src_data Part of raw message being decoded.
|
* \param src_data Part of raw message being decoded.
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <osmocom/core/socket.h>
|
#include <osmocom/core/socket.h>
|
||||||
|
#include <osmocom/core/sockaddr_str.h>
|
||||||
|
|
||||||
#include <osmocom/pfcp/pfcp_proto.h>
|
#include <osmocom/pfcp/pfcp_proto.h>
|
||||||
|
|
||||||
|
@ -40,6 +41,11 @@ int osmo_pfcp_ip_addrs_set(struct osmo_pfcp_ip_addrs *dst, const struct osmo_soc
|
||||||
int osmo_pfcp_ip_addrs_to_str_buf(char *buf, size_t buflen, const struct osmo_pfcp_ip_addrs *addrs);
|
int osmo_pfcp_ip_addrs_to_str_buf(char *buf, size_t buflen, const struct osmo_pfcp_ip_addrs *addrs);
|
||||||
char *osmo_pfcp_ip_addrs_to_str_c(void *ctx, const struct osmo_pfcp_ip_addrs *addrs);
|
char *osmo_pfcp_ip_addrs_to_str_c(void *ctx, const struct osmo_pfcp_ip_addrs *addrs);
|
||||||
|
|
||||||
|
int osmo_pfcp_ip_addrs_get(struct osmo_sockaddr *v4, struct osmo_sockaddr *v6,
|
||||||
|
struct osmo_pfcp_ip_addrs *src);
|
||||||
|
int osmo_pfcp_ip_addrs_get_str(struct osmo_sockaddr_str *v4, struct osmo_sockaddr_str *v6,
|
||||||
|
struct osmo_pfcp_ip_addrs *src);
|
||||||
|
|
||||||
/* 3GPP TS 29.244 8.2.38, IETF RFC 1035 3.1 */
|
/* 3GPP TS 29.244 8.2.38, IETF RFC 1035 3.1 */
|
||||||
struct osmo_pfcp_ie_node_id {
|
struct osmo_pfcp_ie_node_id {
|
||||||
enum osmo_pfcp_node_id_type type;
|
enum osmo_pfcp_node_id_type type;
|
||||||
|
|
|
@ -42,30 +42,15 @@ struct osmo_pfcp_msg;
|
||||||
|
|
||||||
#define OSMO_PFCP_MSGB_ALLOC_SIZE 2048
|
#define OSMO_PFCP_MSGB_ALLOC_SIZE 2048
|
||||||
|
|
||||||
#define OSMO_LOG_PFCP_MSG_SRC(M, LEVEL, file, line, FMT, ARGS...) do { \
|
#define OSMO_LOG_PFCP_MSG_SRC(M, LEVEL, file, line, FMT, ARGS...) \
|
||||||
struct osmo_fsm_inst *_fi = (M) ? ((M)->ctx.session_fi ?: (M)->ctx.peer_fi) : NULL; \
|
LOGPSRC(DLPFCP, LEVEL, file, line, "%s: " FMT, osmo_pfcp_msg_log_info_c(OTC_SELECT, M), ##ARGS)
|
||||||
enum osmo_pfcp_cause *cause = osmo_pfcp_msg_cause(M); \
|
|
||||||
if ((M)->h.seid_present) { \
|
|
||||||
LOGPFSMSLSRC(_fi, DLPFCP, LEVEL, file, line, \
|
|
||||||
"%s%s PFCP seq-%u SEID-0x%"PRIx64" %s%s%s: " FMT, \
|
|
||||||
_fi ? "" : osmo_sockaddr_to_str_c(OTC_SELECT, &(M)->remote_addr), \
|
|
||||||
(M)->rx ? "-rx->" : "<-tx-", (M)->h.sequence_nr, \
|
|
||||||
(M)->h.seid, \
|
|
||||||
osmo_pfcp_message_type_str((M)->h.message_type), cause ? ": " : "", \
|
|
||||||
cause ? osmo_pfcp_cause_str(*cause) : "", ##ARGS); \
|
|
||||||
} else { \
|
|
||||||
LOGPFSMSLSRC(_fi, DLPFCP, LEVEL, file, line, \
|
|
||||||
"%s%s PFCP seq-%u %s%s%s: " FMT, \
|
|
||||||
_fi ? "" : osmo_sockaddr_to_str_c(OTC_SELECT, &(M)->remote_addr), \
|
|
||||||
(M)->rx ? "-rx->" : "<-tx-", (M)->h.sequence_nr, \
|
|
||||||
osmo_pfcp_message_type_str((M)->h.message_type), cause ? ": " : "", \
|
|
||||||
cause ? osmo_pfcp_cause_str(*cause) : "", ##ARGS); \
|
|
||||||
} \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define OSMO_LOG_PFCP_MSG(M, LEVEL, FMT, ARGS...) \
|
#define OSMO_LOG_PFCP_MSG(M, LEVEL, FMT, ARGS...) \
|
||||||
OSMO_LOG_PFCP_MSG_SRC(M, LEVEL, __FILE__, __LINE__, FMT, ##ARGS)
|
OSMO_LOG_PFCP_MSG_SRC(M, LEVEL, __FILE__, __LINE__, FMT, ##ARGS)
|
||||||
|
|
||||||
|
int osmo_pfcp_msg_log_info_buf(char *buf, size_t buflen, const struct osmo_pfcp_msg *m);
|
||||||
|
char *osmo_pfcp_msg_log_info_c(void *ctx, const struct osmo_pfcp_msg *m);
|
||||||
|
|
||||||
struct osmo_pfcp_header_parsed {
|
struct osmo_pfcp_header_parsed {
|
||||||
uint8_t version;
|
uint8_t version;
|
||||||
enum osmo_pfcp_message_type message_type;
|
enum osmo_pfcp_message_type message_type;
|
||||||
|
|
|
@ -7,5 +7,6 @@ Name: Osmocom PFCP library
|
||||||
Description: C Utility Library that implements the PFCP protocol and endpoint
|
Description: C Utility Library that implements the PFCP protocol and endpoint
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Requires: libosmo-gtlv, libosmocore, talloc
|
Requires: libosmo-gtlv, libosmocore, talloc
|
||||||
|
Requires.private: libosmogsm
|
||||||
Libs: -L${libdir} -losmo-pfcp
|
Libs: -L${libdir} -losmo-pfcp
|
||||||
Cflags: -I${includedir}/
|
Cflags: -I${includedir}/
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
$(all_includes) \
|
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(top_builddir) \
|
-I$(top_builddir) \
|
||||||
-I$(builddir) \
|
-I$(builddir) \
|
||||||
|
@ -8,12 +7,6 @@ AM_CPPFLAGS = \
|
||||||
AM_CFLAGS = \
|
AM_CFLAGS = \
|
||||||
-Wall \
|
-Wall \
|
||||||
$(LIBOSMOCORE_CFLAGS) \
|
$(LIBOSMOCORE_CFLAGS) \
|
||||||
$(COVERAGE_CFLAGS) \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
AM_LDFLAGS = \
|
|
||||||
$(LIBOSMOCORE_LIBS) \
|
|
||||||
$(COVERAGE_LDFLAGS) \
|
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
lib_LTLIBRARIES = \
|
lib_LTLIBRARIES = \
|
||||||
|
@ -26,6 +19,10 @@ libosmo_gtlv_la_SOURCES = \
|
||||||
gtlv_gen.c \
|
gtlv_gen.c \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
libosmo_gtlv_la_LIBADD = \
|
||||||
|
$(LIBOSMOCORE_LIBS) \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
# This is _NOT_ the library release version, it's an API version.
|
# This is _NOT_ the library release version, it's an API version.
|
||||||
# Please read Chapter 6 "Library interface versions" of the libtool
|
# Please read Chapter 6 "Library interface versions" of the libtool
|
||||||
# documentation before making any modification
|
# documentation before making any modification
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
$(all_includes) \
|
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(top_builddir)/include \
|
-I$(top_builddir)/include \
|
||||||
-I$(top_builddir) \
|
-I$(top_builddir) \
|
||||||
|
@ -10,15 +9,6 @@ AM_CFLAGS = \
|
||||||
-Wall \
|
-Wall \
|
||||||
$(LIBOSMOCORE_CFLAGS) \
|
$(LIBOSMOCORE_CFLAGS) \
|
||||||
$(LIBOSMOGSM_CFLAGS) \
|
$(LIBOSMOGSM_CFLAGS) \
|
||||||
$(LIBOSMOVTY_CFLAGS) \
|
|
||||||
$(COVERAGE_CFLAGS) \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
AM_LDFLAGS = \
|
|
||||||
$(LIBOSMOCORE_LIBS) \
|
|
||||||
$(LIBOSMOGSM_LIBS) \
|
|
||||||
$(LIBOSMOVTY_LIBS) \
|
|
||||||
$(COVERAGE_LDFLAGS) \
|
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
lib_LTLIBRARIES = \
|
lib_LTLIBRARIES = \
|
||||||
|
@ -35,10 +25,16 @@ libosmo_pfcp_la_SOURCES = \
|
||||||
pfcp_ies_auto.c \
|
pfcp_ies_auto.c \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
libosmo_pfcp_la_LIBADD = \
|
||||||
|
$(top_builddir)/src/libosmo-gtlv/libosmo-gtlv.la \
|
||||||
|
$(LIBOSMOCORE_LIBS) \
|
||||||
|
$(LIBOSMOGSM_LIBS) \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
# This is _NOT_ the library release version, it's an API version.
|
# This is _NOT_ the library release version, it's an API version.
|
||||||
# Please read Chapter 6 "Library interface versions" of the libtool
|
# Please read Chapter 6 "Library interface versions" of the libtool
|
||||||
# documentation before making any modification
|
# documentation before making any modification
|
||||||
LIBVERSION=1:0:1
|
LIBVERSION=2:0:2
|
||||||
|
|
||||||
libosmo_pfcp_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined -export-symbols-regex '^osmo_'
|
libosmo_pfcp_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined -export-symbols-regex '^osmo_'
|
||||||
|
|
||||||
|
@ -68,5 +64,8 @@ gen__pfcp_ies_auto_SOURCES = \
|
||||||
gen__pfcp_ies_auto_LDADD = \
|
gen__pfcp_ies_auto_LDADD = \
|
||||||
$(top_builddir)/src/libosmo-gtlv/libosmo-gtlv.la \
|
$(top_builddir)/src/libosmo-gtlv/libosmo-gtlv.la \
|
||||||
$(LIBOSMOCORE_LIBS) \
|
$(LIBOSMOCORE_LIBS) \
|
||||||
$(COVERAGE_LDFLAGS) \
|
$(NULL)
|
||||||
|
|
||||||
|
gen__pfcp_ies_auto_LDFLAGS = \
|
||||||
|
-no-install \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
|
@ -326,7 +326,12 @@ static int osmo_pfcp_endpoint_retrans_queue_add(struct osmo_pfcp_endpoint *endpo
|
||||||
* Store the message in the local message queue for possible retransmissions.
|
* Store the message in the local message queue for possible retransmissions.
|
||||||
* On success, return zero, and pass ownership of m to ep. ep deallocates m when all retransmissions are done / a reply
|
* On success, return zero, and pass ownership of m to ep. ep deallocates m when all retransmissions are done / a reply
|
||||||
* has been received.
|
* has been received.
|
||||||
* On error, return nonzero, and immediately deallocate m. */
|
* On error, return nonzero, and immediately deallocate m.
|
||||||
|
*
|
||||||
|
* WARNING: Do not access the osmo_pfcp_msg m after calling this function! In most cases, m will still remain allocated,
|
||||||
|
* and accessing it will work, but especially when an error occurs, m will be deallocated immediately. Hence, you will
|
||||||
|
* see no problem during normal successful operation, but your program will crash with use-after-free on any error!
|
||||||
|
*/
|
||||||
int osmo_pfcp_endpoint_tx(struct osmo_pfcp_endpoint *ep, struct osmo_pfcp_msg *m)
|
int osmo_pfcp_endpoint_tx(struct osmo_pfcp_endpoint *ep, struct osmo_pfcp_msg *m)
|
||||||
{
|
{
|
||||||
struct osmo_pfcp_ie_node_id *node_id;
|
struct osmo_pfcp_ie_node_id *node_id;
|
||||||
|
|
|
@ -431,8 +431,10 @@ char *osmo_pfcp_bits_to_str_c(void *ctx, const uint8_t *bits, const struct value
|
||||||
int osmo_pfcp_dec_up_function_features(void *decoded_struct, void *decode_to, const struct osmo_gtlv_load *tlv)
|
int osmo_pfcp_dec_up_function_features(void *decoded_struct, void *decode_to, const struct osmo_gtlv_load *tlv)
|
||||||
{
|
{
|
||||||
struct osmo_pfcp_ie_up_function_features *up_function_features = decode_to;
|
struct osmo_pfcp_ie_up_function_features *up_function_features = decode_to;
|
||||||
ENSURE_LENGTH_IS_AT_LEAST(6);
|
/* 3GPP TS 29.244 version 16.6.0 Release 16 8.2.25 UP Function Features defines at least 6 octets of bits, but
|
||||||
memcpy(up_function_features->bits, tlv->val, 6);
|
* if the peer sends less octets, make do with what we get. */
|
||||||
|
memset(up_function_features->bits, 0, sizeof(up_function_features->bits));
|
||||||
|
memcpy(up_function_features->bits, tlv->val, OSMO_MIN(sizeof(up_function_features->bits), tlv->len));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ struct osmo_pfcp_header_common {
|
||||||
uint8_t message_type;
|
uint8_t message_type;
|
||||||
uint16_t message_length;
|
uint16_t message_length;
|
||||||
#elif OSMO_IS_BIG_ENDIAN
|
#elif OSMO_IS_BIG_ENDIAN
|
||||||
/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
|
/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */
|
||||||
uint8_t version:3, spare:2, follow_on:1, message_priority_present:1, seid_present:1;
|
uint8_t version:3, spare:2, follow_on:1, message_priority_present:1, seid_present:1;
|
||||||
uint8_t message_type;
|
uint8_t message_type;
|
||||||
uint16_t message_length;
|
uint16_t message_length;
|
||||||
|
@ -93,7 +93,7 @@ struct osmo_pfcp_header_seid {
|
||||||
uint8_t message_priority:4,
|
uint8_t message_priority:4,
|
||||||
spare:4;
|
spare:4;
|
||||||
#elif OSMO_IS_BIG_ENDIAN
|
#elif OSMO_IS_BIG_ENDIAN
|
||||||
/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
|
/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */
|
||||||
struct osmo_pfcp_header_common c;
|
struct osmo_pfcp_header_common c;
|
||||||
uint64_t session_endpoint_identifier;
|
uint64_t session_endpoint_identifier;
|
||||||
uint8_t sequence_nr[3];
|
uint8_t sequence_nr[3];
|
||||||
|
@ -514,6 +514,38 @@ int osmo_pfcp_ip_addrs_set(struct osmo_pfcp_ip_addrs *dst, const struct osmo_soc
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int osmo_pfcp_ip_addrs_get(struct osmo_sockaddr *v4, struct osmo_sockaddr *v6, struct osmo_pfcp_ip_addrs *src)
|
||||||
|
{
|
||||||
|
if (v4) {
|
||||||
|
if (src->v4_present)
|
||||||
|
*v4 = src->v4;
|
||||||
|
else
|
||||||
|
*v4 = (struct osmo_sockaddr){ .u.sa.sa_family = AF_UNSPEC };
|
||||||
|
}
|
||||||
|
if (v6) {
|
||||||
|
if (src->v6_present)
|
||||||
|
*v6 = src->v6;
|
||||||
|
else
|
||||||
|
*v6 = (struct osmo_sockaddr){ .u.sa.sa_family = AF_UNSPEC };
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int osmo_pfcp_ip_addrs_get_str(struct osmo_sockaddr_str *v4, struct osmo_sockaddr_str *v6, struct osmo_pfcp_ip_addrs *src)
|
||||||
|
{
|
||||||
|
if (v4) {
|
||||||
|
if (src->v4_present)
|
||||||
|
return osmo_sockaddr_str_from_sockaddr(v4, &src->v4.u.sas);
|
||||||
|
*v4 = (struct osmo_sockaddr_str){};
|
||||||
|
}
|
||||||
|
if (v6) {
|
||||||
|
if (src->v6_present)
|
||||||
|
return osmo_sockaddr_str_from_sockaddr(v6, &src->v6.u.sas);
|
||||||
|
*v6 = (struct osmo_sockaddr_str){};
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* If a osmo_fsm_inst placed in m->ctx deallocates before the osmo_pfcp_msg, call this function, to make sure to avoid
|
/* If a osmo_fsm_inst placed in m->ctx deallocates before the osmo_pfcp_msg, call this function, to make sure to avoid
|
||||||
* use after free. Alternatively use m->ctx.*_use_count to make sure the FSM inst does not deallocate before the
|
* use after free. Alternatively use m->ctx.*_use_count to make sure the FSM inst does not deallocate before the
|
||||||
* osmo_pfcp_msg is discarded from the resend queue. */
|
* osmo_pfcp_msg is discarded from the resend queue. */
|
||||||
|
@ -550,3 +582,32 @@ char *osmo_pfcp_msg_to_str_c(void *ctx, const struct osmo_pfcp_msg *m)
|
||||||
{
|
{
|
||||||
OSMO_NAME_C_IMPL(ctx, 256, "ERROR", osmo_pfcp_msg_to_str_buf, m)
|
OSMO_NAME_C_IMPL(ctx, 256, "ERROR", osmo_pfcp_msg_to_str_buf, m)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int osmo_pfcp_msg_log_info_buf(char *buf, size_t buflen, const struct osmo_pfcp_msg *m)
|
||||||
|
{
|
||||||
|
struct osmo_strbuf sb = { .buf = buf, .len = buflen };
|
||||||
|
struct osmo_fsm_inst *fi = m ? (m->ctx.session_fi ?: m->ctx.peer_fi) : NULL;
|
||||||
|
enum osmo_pfcp_cause *cause = m ? osmo_pfcp_msg_cause(m) : NULL;
|
||||||
|
|
||||||
|
if (fi)
|
||||||
|
OSMO_STRBUF_PRINTF(sb, "%s{%s}: ",
|
||||||
|
osmo_fsm_inst_name(fi),
|
||||||
|
osmo_fsm_state_name(fi->fsm, fi->state));
|
||||||
|
else
|
||||||
|
OSMO_STRBUF_APPEND(sb, osmo_sockaddr_to_str_buf2, &m->remote_addr);
|
||||||
|
OSMO_STRBUF_PRINTF(sb, "%s PFCP seq-%u",
|
||||||
|
m->rx ? "-rx->" : "<-tx-",
|
||||||
|
m->h.sequence_nr);
|
||||||
|
if (m->h.seid_present)
|
||||||
|
OSMO_STRBUF_PRINTF(sb, " SEID-0x%"PRIx64, m->h.seid);
|
||||||
|
|
||||||
|
OSMO_STRBUF_PRINTF(sb, " %s", osmo_pfcp_message_type_str(m->h.message_type));
|
||||||
|
if (cause)
|
||||||
|
OSMO_STRBUF_PRINTF(sb, ": %s", osmo_pfcp_cause_str(*cause));
|
||||||
|
return sb.chars_needed;
|
||||||
|
}
|
||||||
|
|
||||||
|
char *osmo_pfcp_msg_log_info_c(void *ctx, const struct osmo_pfcp_msg *m)
|
||||||
|
{
|
||||||
|
OSMO_NAME_C_IMPL(ctx, 128, "ERROR", osmo_pfcp_msg_log_info_buf, m)
|
||||||
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@ SUBDIRS = \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
$(all_includes) \
|
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
$(all_includes) \
|
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(bulddir) \
|
-I$(bulddir) \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
$(all_includes) \
|
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(bulddir) \
|
-I$(bulddir) \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
$(all_includes) \
|
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(top_builddir)/include \
|
-I$(top_builddir)/include \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
Loading…
Reference in New Issue