PFCP interface added, but not tested.

This commit is contained in:
Sukchan Lee 2019-12-07 13:17:00 +09:00
parent cd6a295039
commit 896ca50253
45 changed files with 4259 additions and 991 deletions

View File

@ -20,7 +20,7 @@
#include "ogs-gtp.h"
void ogs_gtp_bearers_in_create_indirect_tunnel_request(
ogs_gtp_tlv_bearer_context_t *bearers[][GTP_MAX_NUM_OF_INDIRECT_TUNNEL],
ogs_gtp_tlv_bearer_context_t *bearers[][OGS_GTP_MAX_INDIRECT_TUNNEL],
ogs_gtp_create_indirect_data_forwarding_tunnel_request_t *req)
{
@ -38,7 +38,7 @@ void ogs_gtp_bearers_in_create_indirect_tunnel_request(
}
void ogs_gtp_bearers_in_create_indirect_tunnel_response(
ogs_gtp_tlv_bearer_context_t *bearers[][GTP_MAX_NUM_OF_INDIRECT_TUNNEL],
ogs_gtp_tlv_bearer_context_t *bearers[][OGS_GTP_MAX_INDIRECT_TUNNEL],
ogs_gtp_create_indirect_data_forwarding_tunnel_response_t *rsp)
{
(*bearers)[0] = &rsp->bearer_context_0;

View File

@ -26,16 +26,16 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif
#define GTP_MAX_NUM_OF_INDIRECT_TUNNEL 11
#define OGS_GTP_MAX_INDIRECT_TUNNEL 11
/* Create Indirect Data Forwarding Tunnel Request/Response */
void ogs_gtp_bearers_in_create_indirect_tunnel_request(
ogs_gtp_tlv_bearer_context_t *bearers[][GTP_MAX_NUM_OF_INDIRECT_TUNNEL],
ogs_gtp_tlv_bearer_context_t *bearers[][OGS_GTP_MAX_INDIRECT_TUNNEL],
ogs_gtp_create_indirect_data_forwarding_tunnel_request_t *req);
void ogs_gtp_bearers_in_create_indirect_tunnel_response(
ogs_gtp_tlv_bearer_context_t *bearers[][GTP_MAX_NUM_OF_INDIRECT_TUNNEL],
ogs_gtp_tlv_bearer_context_t *bearers[][OGS_GTP_MAX_INDIRECT_TUNNEL],
ogs_gtp_create_indirect_data_forwarding_tunnel_response_t *rsp);
int ogs_gtp_f_teid_to_sockaddr(
@ -49,5 +49,5 @@ int ogs_gtp_ip_to_f_teid(ogs_ip_t *ip, ogs_gtp_f_teid_t *f_teid, int *len);
}
#endif
#endif /* OGS_GTP_CONV_H */
#endif

View File

@ -20,7 +20,7 @@
/*******************************************************************************
* 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: 2019-12-01 21:10:09.850284 by acetcom
* Created on: 2019-12-05 15:41:02.700546 by acetcom
* from 29274-d80.docx
******************************************************************************/

View File

@ -20,7 +20,7 @@
/*******************************************************************************
* 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: 2019-12-01 21:10:09.844182 by acetcom
* Created on: 2019-12-05 15:41:02.692263 by acetcom
* from 29274-d80.docx
******************************************************************************/

View File

@ -193,7 +193,7 @@ else:
f.close()
d_info("[IE Type List]")
cachefile = cachedir + 'tlv_type_list.py'
cachefile = cachedir + 'tlv-type-list.py'
if os.path.isfile(cachefile) and os.access(cachefile, os.R_OK):
execfile(cachefile)
print "Read from " + cachefile

View File

@ -27,3 +27,4 @@ subdir('asn1c')
subdir('s1ap')
subdir('nas')
subdir('gtp')
subdir('pfcp')

182
lib/pfcp/conv.c Normal file
View File

@ -0,0 +1,182 @@
/*
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
*
* This file is part of Open5GS.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "ogs-pfcp.h"
#define OGS_PFCP_F_TEID_HDR_LEN 5
#define OGS_PFCP_F_TEID_IPV4_LEN (OGS_IPV4_LEN + OGS_PFCP_F_TEID_HDR_LEN)
#define OGS_PFCP_F_TEID_IPV6_LEN (OGS_IPV6_LEN + OGS_PFCP_F_TEID_HDR_LEN)
#define OGS_PFCP_F_TEID_IPV4V6_LEN (OGS_IPV4V6_LEN + OGS_PFCP_F_TEID_HDR_LEN)
#define OGS_PFCP_F_SEID_HDR_LEN 9
#define OGS_PFCP_F_SEID_IPV4_LEN (OGS_IPV4_LEN + OGS_PFCP_F_SEID_HDR_LEN)
#define OGS_PFCP_F_SEID_IPV6_LEN (OGS_IPV6_LEN + OGS_PFCP_F_SEID_HDR_LEN)
#define OGS_PFCP_F_SEID_IPV4V6_LEN (OGS_IPV4V6_LEN + OGS_PFCP_F_SEID_HDR_LEN)
int ogs_pfcp_f_seid_to_sockaddr(
ogs_pfcp_f_seid_t *f_seid, uint16_t port, ogs_sockaddr_t **list)
{
ogs_sockaddr_t *addr = NULL, *addr6 = NULL;
ogs_assert(f_seid);
ogs_assert(list);
addr = ogs_calloc(1, sizeof(ogs_sockaddr_t));
ogs_assert(addr);
addr->ogs_sa_family = AF_INET;
addr->ogs_sin_port = htons(port);
addr6 = ogs_calloc(1, sizeof(ogs_sockaddr_t));
ogs_assert(addr6);
addr6->ogs_sa_family = AF_INET6;
addr6->ogs_sin_port = htons(port);
if (f_seid->ipv4 && f_seid->ipv6) {
addr->next = addr6;
addr->sin.sin_addr.s_addr = f_seid->both.addr;
memcpy(addr6->sin6.sin6_addr.s6_addr, f_seid->both.addr6, OGS_IPV6_LEN);
*list = addr;
} else if (f_seid->ipv4) {
addr->sin.sin_addr.s_addr = f_seid->addr;
ogs_free(addr6);
*list = addr;
} else if (f_seid->ipv6) {
memcpy(addr6->sin6.sin6_addr.s6_addr, f_seid->addr6, OGS_IPV6_LEN);
ogs_free(addr);
*list = addr6;
} else {
ogs_free(addr);
ogs_free(addr6);
ogs_assert_if_reached();
}
return OGS_OK;
}
int ogs_pfcp_sockaddr_to_f_seid(
ogs_sockaddr_t *addr, ogs_sockaddr_t *addr6,
ogs_pfcp_f_seid_t *f_seid, int *len)
{
ogs_assert(f_seid);
if (addr && addr6) {
f_seid->ipv4 = 1;
f_seid->both.addr = addr->sin.sin_addr.s_addr;
f_seid->ipv6 = 1;
memcpy(f_seid->both.addr6, addr6->sin6.sin6_addr.s6_addr, OGS_IPV6_LEN);
*len = OGS_PFCP_F_SEID_IPV4V6_LEN;
} else if (addr) {
f_seid->ipv4 = 1;
f_seid->ipv6 = 0;
f_seid->addr = addr->sin.sin_addr.s_addr;
*len = OGS_PFCP_F_SEID_IPV4_LEN;
} else if (addr6) {
f_seid->ipv4 = 0;
f_seid->ipv6 = 1;
memcpy(f_seid->addr6, addr6->sin6.sin6_addr.s6_addr, OGS_IPV6_LEN);
*len = OGS_PFCP_F_SEID_IPV6_LEN;
} else
ogs_assert_if_reached();
return OGS_OK;
}
int ogs_pfcp_f_seid_to_ip(ogs_pfcp_f_seid_t *f_seid, ogs_ip_t *ip)
{
ogs_assert(ip);
ogs_assert(f_seid);
memset(ip, 0, sizeof(ogs_ip_t));
ip->ipv4 = f_seid->ipv4;
ip->ipv6 = f_seid->ipv6;
if (ip->ipv4 && ip->ipv6) {
ip->both.addr = f_seid->both.addr;
memcpy(ip->both.addr6, f_seid->both.addr6, OGS_IPV6_LEN);
ip->len = OGS_IPV4V6_LEN;
} else if (ip->ipv4) {
ip->addr = f_seid->addr;
ip->len = OGS_IPV4_LEN;
} else if (ip->ipv6) {
memcpy(ip->addr6, f_seid->addr6, OGS_IPV6_LEN);
ip->len = OGS_IPV6_LEN;
} else
ogs_assert_if_reached();
return OGS_OK;
}
int ogs_pfcp_sockaddr_to_f_teid(
ogs_sockaddr_t *addr, ogs_sockaddr_t *addr6,
ogs_pfcp_f_teid_t *f_teid, int *len)
{
ogs_assert(f_teid);
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, OGS_IPV6_LEN);
*len = OGS_PFCP_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 = OGS_PFCP_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, OGS_IPV6_LEN);
*len = OGS_PFCP_F_TEID_IPV6_LEN;
} else
ogs_assert_if_reached();
return OGS_OK;
}
int ogs_pfcp_outer_hdr_to_ip(ogs_pfcp_outer_hdr_t *outer_hdr, ogs_ip_t *ip)
{
ogs_assert(ip);
ogs_assert(outer_hdr);
memset(ip, 0, sizeof(ogs_ip_t));
ip->ipv4 = outer_hdr->gtpu_ipv4;
ip->ipv6 = outer_hdr->gtpu_ipv6;
if (ip->ipv4 && ip->ipv6) {
ip->both.addr = outer_hdr->both.addr;
memcpy(ip->both.addr6, outer_hdr->both.addr6, OGS_IPV6_LEN);
ip->len = OGS_IPV4V6_LEN;
} else if (ip->ipv4) {
ip->addr = outer_hdr->addr;
ip->len = OGS_IPV4_LEN;
} else if (ip->ipv6) {
memcpy(ip->addr6, outer_hdr->addr6, OGS_IPV6_LEN);
ip->len = OGS_IPV6_LEN;
} else
ogs_assert_if_reached();
return OGS_OK;
}

48
lib/pfcp/conv.h Normal file
View File

@ -0,0 +1,48 @@
/*
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
*
* This file is part of Open5GS.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#if !defined(OGS_PFCP_INSIDE) && !defined(OGS_PFCP_COMPILATION)
#error "This header cannot be included directly."
#endif
#ifndef OGS_PFCP_CONV_H
#define OGS_PFCP_CONV_H
#ifdef __cplusplus
extern "C" {
#endif
int ogs_pfcp_f_seid_to_sockaddr(
ogs_pfcp_f_seid_t *f_seid, uint16_t port, ogs_sockaddr_t **list);
int ogs_pfcp_sockaddr_to_f_seid(
ogs_sockaddr_t *addr, ogs_sockaddr_t *addr6,
ogs_pfcp_f_seid_t *f_seid, int *len);
int ogs_pfcp_f_seid_to_ip(ogs_pfcp_f_seid_t *f_seid, ogs_ip_t *ip);
int ogs_pfcp_sockaddr_to_f_teid(
ogs_sockaddr_t *addr, ogs_sockaddr_t *addr6,
ogs_pfcp_f_teid_t *f_teid, int *len);
int ogs_pfcp_outer_hdr_to_ip(ogs_pfcp_outer_hdr_t *outer_hdr, ogs_ip_t *ip);
#ifdef __cplusplus
}
#endif
#endif

49
lib/pfcp/meson.build Normal file
View File

@ -0,0 +1,49 @@
# Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
# This file is part of Open5GS.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
libpfcp_sources = files('''
ogs-pfcp.h
message.h
types.h
conv.h
node.h
path.h
xact.h
message.c
types.c
conv.c
node.c
path.c
xact.c
'''.split())
libpfcp_inc = include_directories('.')
libpfcp = library('ogspfcp',
sources : libpfcp_sources,
version : libogslib_version,
c_args : '-DOGS_PFCP_COMPILATION',
include_directories : [libpfcp_inc, libinc],
dependencies : libcore_dep,
install : true)
libpfcp_dep = declare_dependency(
link_with : libpfcp,
include_directories : [libpfcp_inc, libinc],
dependencies : libcore_dep)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

171
lib/pfcp/node.c Normal file
View File

@ -0,0 +1,171 @@
/*
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
*
* This file is part of Open5GS.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "ogs-pfcp.h"
static OGS_POOL(pool, ogs_pfcp_node_t);
int ogs_pfcp_node_init(int size)
{
ogs_pool_init(&pool, size);
return OGS_OK;
}
int ogs_pfcp_node_final(void)
{
ogs_pool_final(&pool);
return OGS_OK;
}
ogs_pfcp_node_t *ogs_pfcp_node_new(ogs_sockaddr_t *sa_list)
{
ogs_pfcp_node_t *node = NULL;
ogs_assert(sa_list);
ogs_pool_alloc(&pool, &node);
ogs_assert(node);
memset(node, 0, sizeof(ogs_pfcp_node_t));
node->sa_list = sa_list;
ogs_list_init(&node->local_list);
ogs_list_init(&node->remote_list);
return node;
}
void ogs_pfcp_node_free(ogs_pfcp_node_t *node)
{
ogs_assert(node);
if (node->sock)
ogs_sock_destroy(node->sock);
ogs_pfcp_xact_delete_all(node);
ogs_freeaddrinfo(node->sa_list);
ogs_pool_free(&pool, node);
}
ogs_pfcp_node_t *ogs_pfcp_node_add(ogs_list_t *list, ogs_pfcp_f_seid_t *f_seid,
uint16_t port, int no_ipv4, int no_ipv6, int prefer_ipv4)
{
int rv;
ogs_pfcp_node_t *node = NULL;
ogs_sockaddr_t *addr = NULL;
ogs_assert(list);
ogs_assert(f_seid);
ogs_assert(port);
rv = ogs_pfcp_f_seid_to_sockaddr(f_seid, port, &addr);
ogs_assert(rv == OGS_OK);
rv = ogs_filter_ip_version(&addr, no_ipv4, no_ipv6, prefer_ipv4);
ogs_assert(addr);
rv = ogs_socknode_fill_scope_id_in_local(addr);
ogs_assert(rv == OGS_OK);
node = ogs_pfcp_node_new(addr);
ogs_assert(node);
rv = ogs_pfcp_f_seid_to_ip(f_seid, &node->ip);
ogs_assert(rv == OGS_OK);
ogs_list_add(list, node);
return node;
}
ogs_pfcp_node_t *ogs_pfcp_node_add_by_addr(
ogs_list_t *list, ogs_sockaddr_t *addr)
{
ogs_pfcp_node_t *gnode = NULL;
ogs_sockaddr_t *new = NULL;
ogs_assert(list);
ogs_assert(addr);
ogs_copyaddrinfo(&new, addr);
gnode = ogs_pfcp_node_new(new);
ogs_assert(gnode);
memcpy(&gnode->remote_addr, new, sizeof gnode->remote_addr);
ogs_list_add(list, gnode);
return gnode;
}
void ogs_pfcp_node_remove(ogs_list_t *list, ogs_pfcp_node_t *node)
{
ogs_assert(node);
ogs_list_remove(list, node);
ogs_pfcp_node_free(node);
}
void ogs_pfcp_node_remove_all(ogs_list_t *list)
{
ogs_pfcp_node_t *node = NULL, *next_node = NULL;
ogs_list_for_each_safe(list, next_node, node)
ogs_pfcp_node_remove(list, node);
}
ogs_pfcp_node_t *ogs_pfcp_node_find_by_addr(
ogs_list_t *list, ogs_sockaddr_t *addr)
{
ogs_pfcp_node_t *node = NULL;
ogs_assert(list);
ogs_assert(addr);
ogs_list_for_each(list, node) {
if (ogs_sockaddr_is_equal(&node->remote_addr, addr) == true)
break;
}
return node;
}
ogs_pfcp_node_t *ogs_pfcp_node_find_by_f_seid(
ogs_list_t *list, ogs_pfcp_f_seid_t *f_seid)
{
int rv;
ogs_pfcp_node_t *node = NULL;
ogs_ip_t ip;
ogs_assert(list);
ogs_assert(f_seid);
rv = ogs_pfcp_f_seid_to_ip(f_seid, &ip);
ogs_assert(rv == OGS_OK);
ogs_list_for_each(list, node) {
if (memcmp(&node->ip, &ip, ip.len) == 0)
break;
}
return node;
}

84
lib/pfcp/node.h Normal file
View File

@ -0,0 +1,84 @@
/*
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
*
* This file is part of Open5GS.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#if !defined(OGS_PFCP_INSIDE) && !defined(OGS_PFCP_COMPILATION)
#error "This header cannot be included directly."
#endif
#ifndef OGS_PFCP_NODE_H
#define OGS_PFCP_NODE_H
#ifdef __cplusplus
extern "C" {
#endif
#define OGS_SETUP_PFCP_NODE(__cTX, __pNODE) \
do { \
ogs_assert((__cTX)); \
ogs_assert((__pNODE)); \
(__cTX)->pnode = __pNODE; \
} while(0)
/**
* This structure represents the commonalities of PFCP node such as MME, SGW,
* PGW gateway. Some of members may not be used by the specific type of node */
typedef struct ogs_pfcp_node_s {
ogs_lnode_t node; /* A node of list_t */
ogs_sockaddr_t *sa_list; /* Socket Address List */
ogs_sock_t *sock; /* Socket Instance */
ogs_ip_t ip; /* Socket Address */
ogs_sockaddr_t remote_addr; /* Connected Address */
ogs_list_t local_list;
ogs_list_t remote_list;
ogs_pfcp_node_id_t node_id; /* Target Node ID */
union {
uint8_t up_functions_features;
uint8_t cp_functions_features;
};
ogs_pfcp_user_plane_ip_resource_information_t user_plane_info;
} ogs_pfcp_node_t;
int ogs_pfcp_node_init(int size);
int ogs_pfcp_node_final(void);
ogs_pfcp_node_t *ogs_pfcp_node_new(ogs_sockaddr_t *sa_list);
void ogs_pfcp_node_free(ogs_pfcp_node_t *node);
ogs_pfcp_node_t *ogs_pfcp_node_add(
ogs_list_t *list, ogs_pfcp_f_seid_t *f_seid,
uint16_t port, int no_ipv4, int no_ipv6, int prefer_ipv4);
ogs_pfcp_node_t *ogs_pfcp_node_add_by_addr(
ogs_list_t *list, ogs_sockaddr_t *addr);
void ogs_pfcp_node_remove(ogs_list_t *list, ogs_pfcp_node_t *node);
void ogs_pfcp_node_remove_all(ogs_list_t *list);
ogs_pfcp_node_t *ogs_pfcp_node_find_by_addr(
ogs_list_t *list, ogs_sockaddr_t *addr);
ogs_pfcp_node_t *ogs_pfcp_node_find_by_f_seid(
ogs_list_t *list, ogs_pfcp_f_seid_t *f_seid);
#ifdef __cplusplus
}
#endif
#endif /* OGS_PFCP_NODE_H */

51
lib/pfcp/ogs-pfcp.h Normal file
View File

@ -0,0 +1,51 @@
/*
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
*
* This file is part of Open5GS.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef OGS_PFCP_H
#define OGS_PFCP_H
#include "ogs-core.h"
#define OGS_PFCP_UDP_PORT 8805
#define OGS_PFCP_INSIDE
#include "pfcp/message.h"
#include "pfcp/types.h"
#include "pfcp/conv.h"
#include "pfcp/node.h"
#include "pfcp/path.h"
#include "pfcp/xact.h"
#ifdef __cplusplus
extern "C" {
#endif
#undef OGS_PFCP_INSIDE
extern int __ogs_pfcp_domain;
#undef OGS_LOG_DOMAIN
#define OGS_LOG_DOMAIN __ogs_pfcp_domain
#ifdef __cplusplus
}
#endif
#endif /* OGS_PFCP_H */

118
lib/pfcp/path.c Normal file
View File

@ -0,0 +1,118 @@
/*
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
*
* This file is part of Open5GS.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "ogs-pfcp.h"
ogs_sock_t *ogs_pfcp_server(ogs_socknode_t *node)
{
char buf[OGS_ADDRSTRLEN];
ogs_sock_t *pfcp;
ogs_assert(node);
pfcp = ogs_udp_server(node);
ogs_assert(pfcp);
ogs_info("pfcp_server() [%s]:%d",
OGS_ADDR(node->addr, buf), OGS_PORT(node->addr));
return pfcp;
}
int ogs_pfcp_connect(ogs_sock_t *ipv4, ogs_sock_t *ipv6, ogs_pfcp_node_t *gnode)
{
ogs_sockaddr_t *addr;
char buf[OGS_ADDRSTRLEN];
ogs_assert(ipv4 || ipv6);
ogs_assert(gnode);
ogs_assert(gnode->sa_list);
addr = gnode->sa_list;
while (addr) {
ogs_sock_t *sock = NULL;
if (addr->ogs_sa_family == AF_INET)
sock = ipv4;
else if (addr->ogs_sa_family == AF_INET6)
sock = ipv6;
else
ogs_assert_if_reached();
if (sock) {
ogs_info("pfcp_connect() [%s]:%d",
OGS_ADDR(addr, buf), OGS_PORT(addr));
gnode->sock = sock;
memcpy(&gnode->remote_addr, addr, sizeof gnode->remote_addr);
break;
}
addr = addr->next;
}
if (addr == NULL) {
ogs_log_message(OGS_LOG_WARN, ogs_socket_errno,
"pfcp_connect() [%s]:%d failed",
OGS_ADDR(gnode->sa_list, buf), OGS_PORT(gnode->sa_list));
return OGS_ERROR;
}
return OGS_OK;
}
int ogs_pfcp_send(ogs_pfcp_node_t *gnode, ogs_pkbuf_t *pkbuf)
{
ssize_t sent;
ogs_sock_t *sock = NULL;
ogs_assert(gnode);
ogs_assert(pkbuf);
sock = gnode->sock;
ogs_assert(sock);
sent = ogs_send(sock->fd, pkbuf->data, pkbuf->len, 0);
if (sent < 0 || sent != pkbuf->len) {
ogs_error("ogs_send() failed");
return OGS_ERROR;
}
return OGS_OK;
}
int ogs_pfcp_sendto(ogs_pfcp_node_t *gnode, ogs_pkbuf_t *pkbuf)
{
ssize_t sent;
ogs_sock_t *sock = NULL;
ogs_sockaddr_t *addr = NULL;
ogs_assert(gnode);
ogs_assert(pkbuf);
sock = gnode->sock;
ogs_assert(sock);
addr = &gnode->remote_addr;
ogs_assert(addr);
sent = ogs_sendto(sock->fd, pkbuf->data, pkbuf->len, 0, addr);
if (sent < 0 || sent != pkbuf->len) {
ogs_error("ogs_send() failed");
return OGS_ERROR;
}
return OGS_OK;
}

48
lib/pfcp/path.h Normal file
View File

@ -0,0 +1,48 @@
/*
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
*
* This file is part of Open5GS.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#if !defined(OGS_PFCP_INSIDE) && !defined(OGS_PFCP_COMPILATION)
#error "This header cannot be included directly."
#endif
#ifndef OGS_PFCP_PATH_H
#define OGS_PFCP_PATH_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct ogs_pfcp_xact_s ogs_pfcp_xact_t;
ogs_sock_t *ogs_pfcp_server(ogs_socknode_t *node);
int ogs_pfcp_connect(
ogs_sock_t *ipv4, ogs_sock_t *ipv6, ogs_pfcp_node_t *gnode);
int ogs_pfcp_send(ogs_pfcp_node_t *gnode, ogs_pkbuf_t *pkbuf);
int ogs_pfcp_sendto(ogs_pfcp_node_t *gnode, ogs_pkbuf_t *pkbuf);
ogs_pkbuf_t *ogs_pfcp_handle_echo_req(ogs_pkbuf_t *pkt);
void ogs_pfcp_send_error_message(
ogs_pfcp_xact_t *xact, uint32_t teid, uint8_t type, uint8_t cause_value);
#ifdef __cplusplus
}
#endif
#endif /* OGS_PFCP_PATH_H */

Binary file not shown.

Binary file not shown.

View File

@ -1,103 +1,173 @@
ies = []
ies.append({ "ie_type" : "Application ID", "ie_value" : "Application ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the Application ID for which PFDs shall be provisioned in the UP function."})
ies.append({ "ie_type" : "PFD context", "ie_value" : "PFD", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the PFD needs to be provisioned in the UP function. When present, it shall describe the PFD to be provisioned in the UP function.Several IEs with the same IE type may be present to provision multiple PFDs for this Application ID. When this IE is absent, the UP function shall delete all the PFDs received and stored earlier in the UP function for this Application ID."})
group_list["Application ID's PFDs"] = { "type" : "58", "ies" : ies }
ies.append({ "ie_type" : "PFD context", "ie_value" : "PFD context", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the PFD needs to be provisioned in the UP function.When present, it shall describe the PFD to be provisioned in the UP function.Several IEs with the same IE type may be present to provision multiple PFDs for this Application ID.When this IE is absent, the UP function shall delete all the PFDs received and stored earlier in the UP function for this Application ID."})
group_list["Application ID's PFDs"] = { "index" : "158", "type" : "58", "ies" : ies }
ies = []
ies.append({ "ie_type" : "PFD contents", "ie_value" : "PFD Contents", "presence" : "M", "instance" : "0", "comment" : "This IE shall describe the PFD to be provisioned in the UP function. Several IEs with the same IE type may be present to provision multiple contents for this PFD."})
group_list["PFD context"] = { "type" : "59", "ies" : ies }
ies.append({ "ie_type" : "PFD contents", "ie_value" : "PFD Contents", "presence" : "M", "instance" : "0", "comment" : "This IE shall describe the PFD to be provisioned in the UP function. Several IEs with the same IE type may be present to provision multiple contents for this PFD. (NOTE 1)"})
group_list["PFD context"] = { "index" : "159", "type" : "59", "ies" : ies }
ies = []
ies.append({ "ie_type" : "Packet Detection Rule ID", "ie_value" : "PDR ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall uniquely identify the PDR among all the PDRs configured for that PFCP session."})
ies.append({ "ie_type" : "Remote GTP-U Peer", "ie_value" : "Remote GTP-U Peer ", "presence" : "M", "instance" : "0", "comment" : "This IE shall include the IP address of the remote GTP-U peer towards which a user plane path failure has been detected.More than one IE with this type may be included to represent multiple remote GTP-U peers towards which a user plane path failure has been detected."})
group_list["User Plane Path Failure Report"] = { "index" : "202", "type" : "102", "ies" : ies }
ies = []
ies.append({ "ie_type" : "PDR ID", "ie_value" : "PDR ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall uniquely identify the PDR among all the PDRs configured for that PFCP session."})
ies.append({ "ie_type" : "Precedence", "ie_value" : "Precedence", "presence" : "M", "instance" : "0", "comment" : "This IE shall indicate the PDRs precedence to be applied by the UP function among all PDRs of the PFCP session, when looking for a PDR matching an incoming packet."})
ies.append({ "ie_type" : "PDI", "ie_value" : "PDI", "presence" : "M", "instance" : "0", "comment" : "This IE shall contain the PDI against which incoming packets will be matched. See Table 7.5.2.2-2."})
ies.append({ "ie_type" : "PDI", "ie_value" : "PDI", "presence" : "M", "instance" : "0", "comment" : "This IE shall contain the PDI against which incoming packets will be matched.See Table 7.5.2.2-2."})
ies.append({ "ie_type" : "Outer Header Removal", "ie_value" : "Outer Header Removal", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function is required to remove one or more outer header(s) from the packets matching this PDR."})
ies.append({ "ie_type" : "FAR ID", "ie_value" : "FAR ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Activate Predefined Rules IE is not included or if it is included but it does not result in activating a predefined FAR.When present this IE shall contain the FAR ID to be associated to the PDR."})
ies.append({ "ie_type" : "URR ID", "ie_value" : "URR ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a measurement action shall be applied to packets matching this PDR.When present, this IE shall contain the URR IDs to be associated to the PDR. Several IEs within the same IE type may be present to represent a list of URRs to be associated to the PDR."})
ies.append({ "ie_type" : "QER ID", "ie_value" : "QER ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a QoS enforcement action shall be applied to packets matching this PDR.When present, this IE shall contain the QER IDs to be associated to the PDR. Several IEs within the same IE type may be present to represent a list of QERs to be associated to the PDR."})
ies.append({ "ie_type" : "FAR ID", "ie_value" : "FAR ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Activate Predefined Rules IE is not included or if it is included but it does not result in activating a predefined FAR, and if the MAR ID is not included.When present this IE shall contain the FAR ID to be associated to the PDR."})
ies.append({ "ie_type" : "URR ID", "ie_value" : "URR ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a measurement action shall be applied to packets matching this PDR.When present, this IE shall contain the URR IDs to be associated to the PDR.Several IEs within the same IE type may be present to represent a list of URRs to be associated to the PDR."})
ies.append({ "ie_type" : "QER ID", "ie_value" : "QER ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a QoS enforcement or QoS marking action shall be applied to packets matching this PDR.When present, this IE shall contain the QER IDs to be associated to the PDR. Several IEs within the same IE type may be present to represent a list of QERs to be associated to the PDR."})
ies.append({ "ie_type" : "Activate Predefined Rules", "ie_value" : "Activate Predefined Rules", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if Predefined Rule(s) shall be activated for this PDR. When present this IE shall contain one Predefined Rules name.Several IEs with the same IE type may be present to represent multiple Activate Predefined Rules names."})
group_list["Create PDR"] = { "type" : "1", "ies" : ies }
ies.append({ "ie_type" : "Activation Time", "ie_value" : "Activation Time", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if the PDR activation shall be deferred. (NOTE 1)"})
ies.append({ "ie_type" : "Deactivation Time", "ie_value" : "Deactivation Time", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if the PDR deactivation shall be deferred. (NOTE 1)"})
ies.append({ "ie_type" : "MAR ID", "ie_value" : "MAR ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the PDR is provisioned to match the downlink traffic towards the UE for a PFCP session established for a MA PDU session."})
ies.append({ "ie_type" : "Packet Replication and Detection Carry-On Information", "ie_value" : "Packet Replication and Detection Carry-On Information", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the PDR is provisioned to match a broadcast packet. When present, it contains the information to instruct the UPF to replicate the packet and to carry-on the look-up of other PDRs of other PFCP sessions matching the packet (see clause 5.2.1)."})
group_list["Create PDR"] = { "index" : "101", "type" : "1", "ies" : ies }
ies = []
ies.append({ "ie_type" : "Source Interface", "ie_value" : "Source Interface", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the source interface of the incoming packet."})
ies.append({ "ie_type" : "F-TEID", "ie_value" : "Local F-TEID", "presence" : "O", "instance" : "0", "comment" : "If present, this IE shall identify the local F-TEID to match for an incoming packet. The CP function shall set the CHOOSE (CH) bit to 1 if the UP function supports the allocation of F-TEID and the CP function requests the UP function to assign a local F-TEID to the PDR."})
ies.append({ "ie_type" : "Network Instance", "ie_value" : "Network Instance", "presence" : "O", "instance" : "0", "comment" : "If present, this IE shall identify the Network instance to match for the incoming packet. See NOTE 1, NOTE2."})
ies.append({ "ie_type" : "UE IP Address", "ie_value" : "UE IP address", "presence" : "O", "instance" : "0", "comment" : "If present, this IE shall identify the source or destination IP address to match for the incoming packet. "})
ies.append({ "ie_type" : "SDF Filter", "ie_value" : "SDF Filter", "presence" : "O", "instance" : "0", "comment" : "If present, this IE shall identify the SDF filter to match for the incoming packet. "})
ies.append({ "ie_type" : "F-TEID", "ie_value" : "Local F-TEID", "presence" : "O", "instance" : "0", "comment" : "This IE shall not be present if Traffic Endpoint ID is present.If present, this IE shall identify the local F-TEID to match for an incoming packet.The CP function shall set the CHOOSE (CH) bit to 1 if the UP function supports the allocation of F-TEID and the CP function requests the UP function to assign a local F-TEID to the PDR."})
ies.append({ "ie_type" : "Network Instance", "ie_value" : "Network Instance", "presence" : "O", "instance" : "0", "comment" : "This IE shall not be present if Traffic Endpoint ID is present. It shall be present if the CP function requests the UP function to allocate a UE IP address/prefix and the Traffic Endpoint ID is not present.If present, this IE shall identify the Network instance to match for the incoming packet. See NOTE 1, NOTE2."})
ies.append({ "ie_type" : "UE IP Address", "ie_value" : "UE IP address", "presence" : "O", "instance" : "0", "comment" : "This IE shall not be present if Traffic Endpoint ID is present.If present, this IE shall identify the source or destination IP address to match for the incoming packet. (NOTE 5)The CP function shall set the CHOOSE (CH) bit to 1 if the UP function supports the allocation of UE IP address/ prefix and the CP function requests the UP function to assign a UE IP address/prefix to the PDR."})
ies.append({ "ie_type" : "Traffic Endpoint ID", "ie_value" : "Traffic Endpoint ID", "presence" : "C", "instance" : "0", "comment" : "This IE may be present if the UP function has indicated the support of PDI optimization.If present, this IE shall uniquely identify the Traffic Endpoint for that PFCP session.Several IEs with the same IE type may be present to provision several Traffic Endpoints with different Traffic Endpoint IDs, from which the UPF may receive packets pertaining to the same service data flow, which is subject for the same FAR, QER and URR, if the UPF has indicated it supports MTE feature as specified in clause 8.2.25. See NOTE 6."})
ies.append({ "ie_type" : "SDF Filter", "ie_value" : "SDF Filter", "presence" : "O", "instance" : "0", "comment" : "If present, this IE shall identify the SDF filter to match for the incoming packet. Several IEs with the same IE type may be present to provision a list of SDF Filters. The full set of applicable SDF filters, if any, shall be provided during the creation or the modification of the PDI.See NOTE 3."})
ies.append({ "ie_type" : "Application ID", "ie_value" : "Application ID", "presence" : "O", "instance" : "0", "comment" : "If present, this IE shall identify the Application ID to match for the incoming packet. "})
group_list["PDI"] = { "type" : "2", "ies" : ies }
ies.append({ "ie_type" : "Ethernet PDU Session Information", "ie_value" : "Ethernet PDU Session Information", "presence" : "O", "instance" : "0", "comment" : "This IE may be present to identify all the (DL) Ethernet packets matching an Ethernet PDU session (see clause 5.13.1)."})
ies.append({ "ie_type" : "Ethernet Packet Filter", "ie_value" : "Ethernet Packet Filter", "presence" : "O", "instance" : "0", "comment" : "If present, this IE shall identify the Ethernet PDU to match for the incoming packet.Several IEs with the same IE type may be present to represent a list of Ethernet Packet Filters.The full set of applicable Ethernet Packet filters, if any, shall be provided during the creation or the modification of the PDI."})
ies.append({ "ie_type" : "QFI", "ie_value" : "QFI", "presence" : "O", "instance" : "0", "comment" : "This IE shall not be present if Traffic Endpoint ID is present and the QFI(s) are included in the Traffic Endpoint.If present, this IE shall identify the QoS Flow Identifier to match for the incoming packet.Several IEs with the same IE type may be present to provision a list of QFIs. When present, the full set of applicable QFIs shall be provided during the creation or the modification of the PDI. "})
ies.append({ "ie_type" : "Framed-Route", "ie_value" : "Framed-Route", "presence" : "O", "instance" : "0", "comment" : "This IE may be present for a DL PDR if the UPF indicated support of Framed Routing (see clause 8.2.25). If present, this IE shall describe a framed route.Several IEs with the same IE type may be present to provision a list of framed routes. (NOTE 5)"})
ies.append({ "ie_type" : "Framed-Routing", "ie_value" : "Framed-Routing", "presence" : "O", "instance" : "0", "comment" : "This IE may be present for a DL PDR if the UPF indicated support of Framed Routing (see clause 8.2.25). If present, this IE shall describe a framed route. "})
ies.append({ "ie_type" : "Framed-IPv6-Route", "ie_value" : "Framed-IPv6-Route", "presence" : "O", "instance" : "0", "comment" : "This IE may be present for a DL PDR if the UPF indicated support of Framed Routing (see clause 8.2.25). If present, this IE shall describe a framed IPv6 route.Several IEs with the same IE type may be present to provision a list of framed IPv6 routes. (NOTE 5)"})
ies.append({ "ie_type" : "3GPP Interface Type", "ie_value" : "Source Interface Type", "presence" : "O", "instance" : "0", "comment" : "This IE may be present to indicate the 3GPP interface type of the source interface, if required by functionalities in the UP Function, e.g. for performance measurements."})
group_list["PDI"] = { "index" : "102", "type" : "2", "ies" : ies }
ies = []
ies.append({ "ie_type" : "Ethernet Filter ID", "ie_value" : "Ethernet Filter ID", "presence" : "C", "instance" : "0", "comment" : "This shall be present if Bidirectional Ethernet filter is required. This IE shall uniquely identify an Ethernet Filter among all the Ethernet Filters provisioned for a given PFCP session."})
ies.append({ "ie_type" : "Ethernet Filter Properties", "ie_value" : "Ethernet Filter Properties", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present when provisioning a bidirectional Ethernet Filter the first time (see clause 5.13.4)."})
ies.append({ "ie_type" : "MAC address", "ie_value" : "MAC address", "presence" : "O", "instance" : "0", "comment" : "If present, this IE shall identify the MAC address.This IE may be present up to 16 times."})
ies.append({ "ie_type" : "Ethertype", "ie_value" : "Ethertype", "presence" : "O", "instance" : "0", "comment" : "If present, this IE shall identify the Ethertype."})
ies.append({ "ie_type" : "C-TAG", "ie_value" : "C-TAG", "presence" : "O", "instance" : "0", "comment" : "If present, this IE shall identify the Customer-VLAN tag."})
ies.append({ "ie_type" : "S-TAG", "ie_value" : "S-TAG", "presence" : "O", "instance" : "0", "comment" : "If present, this IE shall identify the Service-VLAN tag."})
ies.append({ "ie_type" : "SDF Filter", "ie_value" : "SDF Filter", "presence" : "O", "instance" : "0", "comment" : "If packet filtering is required, for Ethernet frames with Ethertype indicating IPv4 or IPv6 payload, this IE shall describe the IP Packet Filter Set.Several IEs with the same IE type may be present to represent a list of SDF filters."})
group_list["Ethernet Packet Filter"] = { "index" : "232", "type" : "132", "ies" : ies }
ies = []
ies.append({ "ie_type" : "FAR ID", "ie_value" : "FAR ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall uniquely identify the FAR among all the FARs configured for that PFCP session."})
ies.append({ "ie_type" : "Apply Action", "ie_value" : "Apply Action", "presence" : "M", "instance" : "0", "comment" : "This IE shall indicate the action to apply to the packets, See subclauses 5.2.1 and 5.2.3."})
ies.append({ "ie_type" : "Forwarding Parameters", "ie_value" : "Forwarding Parameters", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present when the Apply-Action requests the packets to be forwarded. It may be present otherwise. When present, this IE shall contain the forwarding instructions to be applied by the UP function when the Apply-Action requests the packets to be forwarded. See table 7.5.2.3-2."})
ies.append({ "ie_type" : "Duplicating Parameters", "ie_value" : "Duplicating Parameters", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present when the Apply-Action requests the packets to be duplicated. It may be present otherwise. When present, this IE shall contain the forwarding instructions to be applied by the UP function for the traffic to be duplicated, when the Apply-Action requests the packets to be duplicated. See table 7.5.2.3-3."})
ies.append({ "ie_type" : "BAR ID", "ie_value" : "BAR ID", "presence" : "O", "instance" : "0", "comment" : "When present, this IE shall contain the BAR ID of the BAR defining the buffering instructions to be applied by the UP function when the Apply Action requests the packets to be buffered. See table 7.5.2.6-1."})
group_list["Create FAR"] = { "type" : "3", "ies" : ies }
ies.append({ "ie_type" : "Apply Action", "ie_value" : "Apply Action", "presence" : "M", "instance" : "0", "comment" : "This IE shall indicate the action to apply to the packets, See clauses 5.2.1 and 5.2.3."})
ies.append({ "ie_type" : "Forwarding Parameters", "ie_value" : "Forwarding Parameters", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present when the Apply Action requests the packets to be forwarded. It may be present otherwise.When present, this IE shall contain the forwarding instructions to be applied by the UP function when the Apply Action requests the packets to be forwarded.See table 7.5.2.3-2."})
ies.append({ "ie_type" : "Duplicating Parameters", "ie_value" : "Duplicating Parameters", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present when the Apply Action requests the packets to be duplicated. It may be present otherwise.When present, this IE shall contain the forwarding instructions to be applied by the UP function for the traffic to be duplicated, when the Apply Action requests the packets to be duplicated.Several IEs with the same IE type may be present to represent to duplicate the packets to different destinations. See NOTE 1.See table 7.5.2.3-3."})
ies.append({ "ie_type" : "BAR ID", "ie_value" : "BAR ID", "presence" : "O", "instance" : "0", "comment" : "When present, this IE shall contain the BAR ID of the BAR defining the buffering instructions to be applied by the UP function when the Apply Action requests the packets to be buffered. "})
group_list["Create FAR"] = { "index" : "103", "type" : "3", "ies" : ies }
ies = []
ies.append({ "ie_type" : "Destination Interface", "ie_value" : "Destination Interface", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the destination interface of the outgoing packet."})
ies.append({ "ie_type" : "Network Instance", "ie_value" : "Network Instance", "presence" : "O", "instance" : "0", "comment" : "When present, this IE shall identify the Network instance towards which to send the outgoing packet. See NOTE 1."})
ies.append({ "ie_type" : "Redirect Information", "ie_value" : "Redirect Information", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function is required to enforce traffic redirection towards a redirect destination provided by the CP function. "})
ies.append({ "ie_type" : "Outer Header Creation", "ie_value" : "Outer Header Creation", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function is required to add one or more outer header(s) to the outgoing packet. If present, it shall contain the F-TEID of the remote GTP-U peer when adding a GTP-U/UDP/IP header, or the Destination IP address and Port Number when adding a UDP/IP header."})
ies.append({ "ie_type" : "Transport Level Marking", "ie_value" : "Transport Level Marking", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function is required to mark the IP header with the DSCP marking as defined by IETFRFC2474[22]. When present, it shall contain the value of the DSCP in the TOS/Traffic Class field set based on the QCI, and optionally the ARP priority level, of the associated EPS bearer, as described in sub-clause 4.7.3 of 3GPPTS23.214[2]."})
ies.append({ "ie_type" : "Forwarding Policy", "ie_value" : "Forwarding Policy", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a specific forwarding policy is required to be applied to the packets. It shall be present if the Destination Interface IE is set to SGi-LAN. It may be present if the Destination Interface is set to Core. When present, it shall contain an Identifier of the Forwarding Policy locally configured in the UP function."})
ies.append({ "ie_type" : "Outer Header Creation", "ie_value" : "Outer Header Creation", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function is required to add one or more outer header(s) to the outgoing packet. If present, it shall contain the F-TEID of the remote GTP-U peer when adding a GTP-U/UDP/IP header, or the Destination IP address and/or Port Number when adding a UDP/IP header or an IP header or the C-TAG/S-TAG (for 5GC). See NOTE 2."})
ies.append({ "ie_type" : "Transport Level Marking", "ie_value" : "Transport Level Marking", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function is required to mark the IP header with the DSCP marking as defined by IETFRFC2474[22]. When present for EPC, it shall contain the value of the DSCP in the TOS/Traffic Class field set based on the QCI, and optionally the ARP priority level, of the associated EPS bearer, as described in clause 5.10 of 3GPPTS23.214[2]. When present for 5GC, it shall contain the value of the DSCP in the TOS/Traffic Class field set based on the 5QI, the Priority Level (if explicitly signalled), and optionally the ARP priority level, of the associated QoS flow, as described in clause 5.8.2.7 of 3GPPTS23.501[28],"})
ies.append({ "ie_type" : "Forwarding Policy", "ie_value" : "Forwarding Policy", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a specific forwarding policy is required to be applied to the packets. It shall be present if the Destination Interface IE is set to SGi-LAN / N6-LAN. It may be present if the Destination Interface is set to Core, Access, or CP-Function. See NOTE 2.When present, it shall contain an Identifier of the Forwarding Policy locally configured in the UP function."})
ies.append({ "ie_type" : "Header Enrichment", "ie_value" : "Header Enrichment", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if the UP function indicated support of Header Enrichment of UL traffic. When present, it shall contain information for header enrichment."})
group_list["Forwarding Parameters"] = { "type" : "4", "ies" : ies }
ies.append({ "ie_type" : "Traffic Endpoint ID", "ie_value" : "Linked Traffic Endpoint ID", "presence" : "C", "instance" : "0", "comment" : "This IE may be present, if it is available and the UP function indicated support of the PDI optimisation feature, (see clause 8.2.25). When present, it shall identify the Traffic Endpoint ID allocated for this PFCP session to receive the traffic in the reverse direction (see clause 5.2.3.1)."})
ies.append({ "ie_type" : "Proxying", "ie_value" : "Proxying", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if proxying is to be performed by the UP function.When present, this IE shall contain the information that the UPF shall respond to Address Resolution Protocol and / or IPv6 Neighbour Solicitation based on the local cache information for the Ethernet PDUs."})
ies.append({ "ie_type" : "3GPP Interface Type", "ie_value" : "Destination Interface Type", "presence" : "O", "instance" : "0", "comment" : "This IE may be present to indicate the 3GPP interface type of the destination interface, if required by functionalities in the UP Function, e.g. for performance measurements."})
group_list["Forwarding Parameters"] = { "index" : "104", "type" : "4", "ies" : ies }
ies = []
ies.append({ "ie_type" : "Destination Interface", "ie_value" : "Destination Interface", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the destination interface of the outgoing packet."})
ies.append({ "ie_type" : "Outer Header Creation", "ie_value" : "Outer Header Creation", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function is required to add one or more outer header(s) to the outgoing packet. If present, it shall contain the F-TEID of the remote GTP-U peer."})
ies.append({ "ie_type" : "Outer Header Creation", "ie_value" : "Outer Header Creation", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function is required to add one or more outer header(s) to the outgoing packet. If present, it shall contain the F-TEID of the remote GTP-U peer. See NOTE 1."})
ies.append({ "ie_type" : "Transport Level Marking", "ie_value" : "Transport Level marking", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function is required to mark the IP header with the DSCP marking as defined by IETFRFC2474[22]. When present, it shall contain the value of the DSCP in the TOS/Traffic Class field. "})
ies.append({ "ie_type" : "Forwarding Policy", "ie_value" : "Forwarding Policy", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a specific forwarding policy is required to be applied to the packets. When present, it shall contain an Identifier of the Forwarding Policy locally configured in the UP function."})
group_list["Duplicating Parameters"] = { "type" : "5", "ies" : ies }
group_list["Duplicating Parameters"] = { "index" : "105", "type" : "5", "ies" : ies }
ies = []
ies.append({ "ie_type" : "URR ID", "ie_value" : "URR ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall uniquely identify the URR among all the URRs configured for this PFCP session."})
ies.append({ "ie_type" : "Measurement Method", "ie_value" : "Measurement Method", "presence" : "M", "instance" : "0", "comment" : "This IE shall indicate the method for measuring the network resources usage, i.e. whether the data volume, duration (i.e. time), combined volume/duration, or event shall be measured."})
ies.append({ "ie_type" : "Reporting Triggers", "ie_value" : "Reporting Triggers", "presence" : "M", "instance" : "0", "comment" : "This IE shall indicate the trigger(s) for reporting network resources usage to the CP function, e.g. periodic reporting or reporting upon reaching a threshold, or envelope closure."})
ies.append({ "ie_type" : "Measurement Period", "ie_value" : "Measurement Period", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if periodic reporting is required. When present, it shall indicate the period for generating and reporting usage reports. "})
ies.append({ "ie_type" : "Volume Threshold", "ie_value" : "Volume Threshold", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if volume-based measurement is used and reporting is required upon reaching a volume threshold. When present, it shall indicate the traffic volume value after which the UP function shall report network resources usage to the CP function for this URR."})
ies.append({ "ie_type" : "Volume Quota", "ie_value" : "Volume Quota", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if volume-based measurement is used and the CP function needs to provision a Volume Quota in the UP function (see subclause 5.2.2.2) When present, it shall indicate the Volume Quota value."})
ies.append({ "ie_type" : "Volume Quota", "ie_value" : "Volume Quota", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if volume-based measurement is used and the CP function needs to provision a Volume Quota in the UP function (see clause 5.2.2.2)When present, it shall indicate the Volume Quota value."})
ies.append({ "ie_type" : "Event Threshold", "ie_value" : "Event Threshold", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if event-based measurement is used and reporting is required upon reaching an event threshold. When present, it shall indicate the number of events after which the UP function shall report to the CP function for this URR."})
ies.append({ "ie_type" : "Event Quota", "ie_value" : "Event Quota", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if event-based measurement is used and the CP function needs to provision an Event Quota in the UP function (see clause 5.2.2.2)When present, it shall indicate the Event Quota value."})
ies.append({ "ie_type" : "Time Threshold", "ie_value" : "Time Threshold", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if time-based measurement is used and reporting is required upon reaching a time threshold. When present, it shall indicate the time usage after which the UP function shall report network resources usage to the CP function for this URR."})
ies.append({ "ie_type" : "Time Quota", "ie_value" : "Time Quota", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if time-based measurement is used and the CP function needs to provision a Time Quota in the UP function (see subclause 5.2.2.2) When present, it shall indicate the Time Quota value"})
ies.append({ "ie_type" : "Quota Holding Time", "ie_value" : "Quota Holding Time", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present, for a time, volume or event-based measurement, if reporting is required and packets are no longer permitted to pass on when no packets are received during a given inactivity period. When present, it shall contain the duration of the inactivity period."})
ies.append({ "ie_type" : "Dropped DL Traffic Threshold", "ie_value" : "Dropped DL Traffic Threshold", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if reporting is required when the DL traffic being dropped exceeds a threshold. When present, it shall contain the threshold of the DL traffic being dropped."})
ies.append({ "ie_type" : "Time Quota", "ie_value" : "Time Quota", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if time-based measurement is used and the CP function needs to provision a Time Quota in the UP function (see clause 5.2.2.2)When present, it shall indicate the Time Quota value"})
ies.append({ "ie_type" : "Quota Holding Time", "ie_value" : "Quota Holding Time", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present, for a time, volume or event-based measurement, if reporting is required and packets are no longer permitted to pass on when no packets are received during a given inactivity period.When present, it shall contain the duration of the inactivity period."})
ies.append({ "ie_type" : "Dropped DL Traffic Threshold", "ie_value" : "Dropped DL Traffic Threshold", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if reporting is required when the DL traffic being dropped exceeds a threshold.When present, it shall contain the threshold of the DL traffic being dropped."})
ies.append({ "ie_type" : "Quota Validity Time", "ie_value" : "Quota Validity Time", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if reporting is required when the Quota Validity time for a given Quota is over."})
ies.append({ "ie_type" : "Monitoring Time", "ie_value" : "Monitoring Time", "presence" : "O", "instance" : "0", "comment" : "When present, this IE shall contain the time at which the UP function shall re-apply the volume or time threshold. "})
ies.append({ "ie_type" : "Subsequent Volume Threshold", "ie_value" : "Subsequent Volume Threshold", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if the Monitoring Time IE is present and volume-based measurement is used. When present, it shall indicate the traffic volume value after which the UP function shall report network resources usage to the CP function for this URR for the period after the Monitoring Time."})
ies.append({ "ie_type" : "Subsequent Time Threshold", "ie_value" : "Subsequent Time Threshold", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if the Monitoring Time IE is present and time-based measurement is used. When present, it shall indicate the time usage after which the UP function shall report network resources usage to the CP function for this URR for the period after the Monitoring Time."})
ies.append({ "ie_type" : "Subsequent Volume Quota", "ie_value" : "Subsequent Volume Quota", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if Monitoring Time IE is present and volume-based measurement is used (see subclause 5.2.2.2). When present, it shall indicate the Volume Quota value which the UP function shall use for this URR for the period after the Monitoring Time."})
ies.append({ "ie_type" : "Subsequent Time Quota", "ie_value" : "Subsequent Time Quota", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if Monitoring Time IE is present and time-based measurement is used (see subclause 5.2.2.2) When present, it shall indicate the Time Quota value which the UP function shall use for this URR for the period after the Monitoring Time."})
ies.append({ "ie_type" : "Subsequent Volume Threshold", "ie_value" : "Subsequent Volume Threshold", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if the Monitoring Time IE is present and volume-based measurement is used.When present, it shall indicate the traffic volume value after which the UP function shall report network resources usage to the CP function for this URR for the period after the Monitoring Time."})
ies.append({ "ie_type" : "Subsequent Time Threshold", "ie_value" : "Subsequent Time Threshold", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if the Monitoring Time IE is present and time-based measurement is used.When present, it shall indicate the time usage after which the UP function shall report network resources usage to the CP function for this URR for the period after the Monitoring Time."})
ies.append({ "ie_type" : "Subsequent Volume Quota", "ie_value" : "Subsequent Volume Quota", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if Monitoring Time IE is present and volume-based measurement is used (see clause 5.2.2.2).When present, it shall indicate the Volume Quota value which the UP function shall use for this URR for the period after the Monitoring Time."})
ies.append({ "ie_type" : "Subsequent Time Quota", "ie_value" : "Subsequent Time Quota", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if Monitoring Time IE is present and time-based measurement is used (see clause 5.2.2.2)When present, it shall indicate the Time Quota value which the UP function shall use for this URR for the period after the Monitoring Time."})
ies.append({ "ie_type" : "Subsequent Event Threshold", "ie_value" : "Subsequent Event Threshold", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if the Monitoring Time IE is present and event-based measurement is used.When present, it shall indicate the number of events after which the UP function shall report to the CP function for this URR for the period after the Monitoring Time."})
ies.append({ "ie_type" : "Subsequent Event Quota", "ie_value" : "Subsequent Event Quota", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if Monitoring Time IE is present and event-based measurement is used (see clause 5.2.2.2).When present, it shall indicate the Event Quota value which the UP function shall use for this URR for the period after the Monitoring Time."})
ies.append({ "ie_type" : "Inactivity Detection Time", "ie_value" : "Inactivity Detection Time", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if time-based measurement is used and the time measurement need to be suspended when no packets are received during a given inactivity period. When present, it shall contain the duration of the inactivity period."})
ies.append({ "ie_type" : "Linked URR ID", "ie_value" : "Linked URR ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if linked usage reporting is required. When present, this IE shall contain the linked URR ID which is related with this URR (see subclause 5.2.2.4). "})
ies.append({ "ie_type" : "Measurement Information", "ie_value" : "Measurement Information", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if any of the following flag is set to 1.Applicable flags are:- Measurement Before QoS Enforcement Flag: this flag shall be set to 1 if the traffic usage before any QoS Enforcement is requested to be measured. - Inactive Measurement Flag: this flag shall be set to 1 if the measurement shall be paused (inactive). The measurement shall be performed (active) if the bit is set to 0 or if the Measurement Information IE is not present in the Create URR IE.- Reduced Application Detection Information Flag: this flag may be set to 1, if the Reporting Triggers request to report the start or stop of application, to request the UP function to only report the Application ID in the Application Detection Information, e.g. for envelope reporting."})
ies.append({ "ie_type" : "Linked URR ID", "ie_value" : "Linked URR ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if linked usage reporting is required. When present, this IE shall contain the linked URR ID which is related with this URR (see clause 5.2.2.4).Several IEs with the same IE type may be present to represent multiple linked URRs which are related with this URR."})
ies.append({ "ie_type" : "Measurement Information", "ie_value" : "Measurement Information", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if any of the following flag is set to 1.Applicable flags are:- Measurement Before QoS Enforcement Flag: this flag shall be set to 1 if the traffic usage before any QoS Enforcement is requested to be measured.- Inactive Measurement Flag: this flag shall be set to 1 if the measurement shall be paused (inactive). The measurement shall be performed (active) if the bit is set to 0 or if the Measurement Information IE is not present in the Create URR IE.- Reduced Application Detection Information Flag: this flag may be set to 1, if the Reporting Triggers request to report the start or stop of application, to request the UP function to only report the Application ID in the Application Detection Information, e.g. for envelope reporting.- Immediate Start Time Metering Flag: this flag may be set to 1 if time-based measurement is used and the UP function is requested to start the time metering immediately at receiving the flag. .- Measurement of Number of Packets Flag: this flag may be set to 1 when the Volume-based measurement applies, to request the UP function to report the number of packets in UL/DL/Total in addition to the measurement in octet."})
ies.append({ "ie_type" : "Time Quota Mechanism", "ie_value" : "Time Quota Mechanism", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if time-based measurement based on CTP or DTP is used."})
ies.append({ "ie_type" : "Aggregated URRs", "ie_value" : "Aggregated URRs", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if the URR is used to support a Credit Pool.Several IEs with the same IE type may be present to provide multiple aggregated URRs."})
group_list["Create URR"] = { "type" : "6", "ies" : ies }
ies.append({ "ie_type" : "FAR ID", "ie_value" : "FAR ID for Quota Action", "presence" : "C", "instance" : "0", "comment" : "This IE may be present if the Volume Quota IE and/or the Time Quota IE and/or Event Quota IE is provisioned in the URR and the UP Function indicated support of the Quota Action feature.When present, it shall contain the identifier of the substitute FAR the UP function shall apply, for the traffic associated to this URR, when exhausting any of these quotas. See NOTE 1. "})
ies.append({ "ie_type" : "Ethernet Inactivity Timer", "ie_value" : "Ethernet Inactivity Timer", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if Ethernet traffic reporting is used and the SMF requests the UP function to also report inactive UE MAC addresses.When present, it shall contain the duration of the Ethernet inactivity period."})
ies.append({ "ie_type" : "Additional Monitoring Time", "ie_value" : "Additional Monitoring Time", "presence" : "O", "instance" : "0", "comment" : "When present, this IE shall contain the time at which the UP function shall re-apply the volume or time or event threshold/quota provisioned in the IE.Several IEs with the same IE type may be present to provide multiple Monitoring Times."})
group_list["Create URR"] = { "index" : "106", "type" : "6", "ies" : ies }
ies = []
ies.append({ "ie_type" : "QER ID", "ie_value" : "QER ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall uniquely identify the QER among all the QER configured for that PFCP session"})
ies.append({ "ie_type" : "QER Correlation ID", "ie_value" : "QER Correlation ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function is required to correlate the QERs of several PFCP sessions, for APN-AMBR enforcement of multiple UEs PDN connections to the same APN."})
ies.append({ "ie_type" : "Gate Status", "ie_value" : "Gate Status", "presence" : "M", "instance" : "0", "comment" : "This IE shall indicate whether the packets are allowed to be forwarded (the gate is open) or shall be discarded (the gate is closed) in the uplink and/or downlink directions."})
ies.append({ "ie_type" : "MBR", "ie_value" : "Maximum Bitrate", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if an MBR enforcement action shall be applied to packets matching this PDR. When present, this IE shall indicate the uplink and/or downlink maximum bit rate to be enforced for packets matching the PDR.This IE may be set to the value of: - the APN-AMBR, for a QER that is referenced by all the PDRs of the non-GBR bearers of a PDN connection; - the TDF session MBR, for a QER that is referenced by all the PDRs of a TDF session;- the bearer MBR, for a QER that is referenced by all the PDRs of a bearer;- the SDF MBR, for a QER that is referenced by all the PDRs of a SDF."})
ies.append({ "ie_type" : "GBR", "ie_value" : "Guaranteed Bitrate", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a GBR has been authorized to packets matching this PDR. When present, this IE shall indicate the authorized uplink and/or downlink guaranteed bit rate.This IE may be set to the value of: - the aggregate GBR, for a QER that is referenced by all the PDRs of a GBR bearer;- the SDF GBR, for a QER that is referenced by all the PDRs of a SDF."})
ies.append({ "ie_type" : "Packet Rate", "ie_value" : "Packet Rate", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a Packet Rate enforcement action (in terms of number of packets per time interval) shall be applied to packets matching this PDR. When present, this IE shall indicate the uplink and/or downlink maximum packet rate to be enforced for packets matching the PDR.This IE may be set to the value of: - downlink packet rate for Serving PLMN Rate Control, for a QER that is referenced by all PDRs of the UE belonging to the PDN connection using CIoT EPS Optimizations as described in 3GPPTS23.401[2])- uplink and/or downlink packet rate for APN Rate Control, for a QER that is referenced by all the PDRs of the UE belonging to PDN connections to the same APN using CIoT EPS Optimizations as described in 3GPPTS23.401[2])."})
ies.append({ "ie_type" : "DL Flow Level Marking", "ie_value" : "DL Flow Level Marking", "presence" : "C", "instance" : "0", "comment" : "This IE shall be set if the UP function is required to mark the packets for QoS purposes: - by the TDF-C, for DL flow level marking for application indication (see subclause 5.4.5); - by the PGW-C, for setting the GTP-U Service Class Indicator extension header for service indication towards GERAN (see subclause 5.4.12)."})
ies.append({ "ie_type" : "QFI", "ie_value" : "QoS flow identifier", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the QoS flow identifier shall be included by the UPF."})
ies.append({ "ie_type" : "RQI", "ie_value" : "Reflective QoS", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function is required to set Reflective QoS Identifier to request reflective QoS for uplink traffic."})
group_list["Create QER"] = { "type" : "7", "ies" : ies }
ies.append({ "ie_type" : "MBR", "ie_value" : "Maximum Bitrate", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if an MBR enforcement action shall be applied to packets matching this PDR. When present, this IE shall indicate the uplink and/or downlink maximum bit rate to be enforced for packets matching the PDR.For EPC, this IE may be set to the value of:- the APN-AMBR, for a QER that is referenced by all the PDRs of the non-GBR bearers of a PDN connection;- the TDF session MBR, for a QER that is referenced by all the PDRs of a TDF session;- the bearer MBR, for a QER that is referenced by all the PDRs of a bearer;- the SDF MBR, for a QER that is referenced by all the PDRs of a SDF.For 5GC, this IE may be set to the value of:- the Session-AMBR, for a QER that is referenced by all the PDRs of the non-GBR QoS flows of a PDU session;- the QoS Flow MBR, for a QER that is referenced by all the PDRs of a QoS Flow;- the SDF MBR, for a QER that is referenced by all the PDRs of a SDF."})
ies.append({ "ie_type" : "GBR", "ie_value" : "Guaranteed Bitrate", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a GBR has been authorized to packets matching this PDR. When present, this IE shall indicate the authorized uplink and/or downlink guaranteed bit rate.This IE may be set to the value of:- the aggregate GBR, for a QER that is referenced by all the PDRs of a GBR bearer;- the QoS Flow GBR, for a QER that is referenced by all the PDRs of a QoS Flow (for 5GC);- the SDF GBR, for a QER that is referenced by all the PDRs of a SDF."})
ies.append({ "ie_type" : "Packet Rate", "ie_value" : "Packet Rate", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a Packet Rate enforcement action (in terms of number of packets per time interval) shall be applied to packets matching this PDR.When present, this IE shall indicate the uplink and/or downlink maximum packet rate to be enforced for packets matching the PDR.This IE may be set to the value of:- downlink packet rate for Serving PLMN Rate Control, for a QER that is referenced by all PDRs of the UE belonging to the PDN connection using CIoT EPS Optimizations as described in 3GPPTS23.401[2]);- uplink and/or downlink packet rate for APN Rate Control, for a QER that is referenced by all the PDRs of the UE belonging to PDN connections to the same APN using CIoT EPS Optimizations as described in 3GPPTS23.401[2])."})
ies.append({ "ie_type" : "DL Flow Level Marking", "ie_value" : "DL Flow Level Marking", "presence" : "C", "instance" : "0", "comment" : "This IE shall be set if the UP function is required to mark the packets for QoS purposes:- by the TDF-C, for DL flow level marking for application indication (see clause 5.4.5);- by the PGW-C, for setting the GTP-U Service Class Indicator extension header for service indication towards GERAN (see clause 5.4.12)."})
ies.append({ "ie_type" : "QFI", "ie_value" : "QoS flow identifier", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the QoS flow identifier shall be inserted by the UPF."})
ies.append({ "ie_type" : "RQI", "ie_value" : "Reflective QoS", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function is required to insert a Reflective QoS Identifier to request reflective QoS for uplink traffic."})
ies.append({ "ie_type" : "Paging Policy Indicator", "ie_value" : "Paging Policy Indicator", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UPF is required to set the Paging Policy Indicator (PPI) in outgoing packets (see clause 5.4.3.2 of 3GPPTS23.501[28]).When present, it shall be set to the PPI value to set. "})
ies.append({ "ie_type" : "Averaging Window", "ie_value" : "Averaging Window", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if the UP function is required to use a different Averaging window than the default one. (NOTE)"})
group_list["Create QER"] = { "index" : "107", "type" : "7", "ies" : ies }
ies = []
ies.append({ "ie_type" : "BAR ID", "ie_value" : "BAR ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall uniquely identify the BAR provisioned for that PFCP session."})
ies.append({ "ie_type" : "Downlink Data Notification Delay", "ie_value" : "Downlink Data Notification Delay", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function indicated support of the Downlink Data Notification Delay parameter (see subclause 8.2.28) and the UP function has to delay the notification to the CP function about the arrival of DL data packets. When present, it shall contain the delay the UP function shall apply between receiving a downlink data packet and notifying the CP function about it, when the Apply Action parameter requests to buffer the packets and notify the CP function."})
group_list["Create BAR"] = { "type" : "85", "ies" : ies }
ies.append({ "ie_type" : "Downlink Data Notification Delay", "ie_value" : "Downlink Data Notification Delay", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function indicated support of the Downlink Data Notification Delay parameter (see clause 8.2.28) and the UP function has to delay the notification to the CP function about the arrival of DL data packets.When present, it shall contain the delay the UP function shall apply between receiving a downlink data packet and notifying the CP function about it, when the Apply Action parameter requests to buffer the packets and notify the CP function."})
ies.append({ "ie_type" : "Suggested Buffering Packets Count", "ie_value" : "Suggested Buffering Packets Count", "presence" : "C", "instance" : "0", "comment" : "This IE may be present if the UP Function indicated support of the the feature UDBC.When present, it shall contain the number of packets that are suggested to be buffered when the Apply Action parameter requests to buffer the packets. The packets that exceed the limit shall be discarded."})
group_list["Create BAR"] = { "index" : "185", "type" : "85", "ies" : ies }
ies = []
ies.append({ "ie_type" : "Packet Detection Rule ID", "ie_value" : "PDR ID", "presence" : "M", "instance" : "0", "comment" : ""})
ies.append({ "ie_type" : "Traffic Endpoint ID", "ie_value" : "Traffic Endpoint ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall uniquely identify the Traffic Endpoint for that Sx session."})
ies.append({ "ie_type" : "F-TEID", "ie_value" : "Local F-TEID", "presence" : "O", "instance" : "0", "comment" : "If present, this IE shall identify the local F-TEID to match for an incoming packet.The CP function shall set the CHOOSE (CH) bit to 1 if the UP function supports the allocation of F-TEID and the CP function requests the UP function to assign a local F-TEID to the Traffic Endpoint."})
ies.append({ "ie_type" : "Network Instance", "ie_value" : "Network Instance", "presence" : "O", "instance" : "0", "comment" : "This IE shall be present if the CP function requests the UP function to allocate a UE IP address/prefix.If present, this IE shall identify the Network instance to match for the incoming packet. See NOTE 1, NOTE2."})
ies.append({ "ie_type" : "UE IP Address", "ie_value" : "UE IP address", "presence" : "O", "instance" : "0", "comment" : "If present, this IE shall identify the source or destination IP address to match for the incoming packet. (NOTE 3)The CP function shall set the CHOOSE (CH) bit to 1 if the UP function supports the allocation of UE IP address/ prefix and the CP function requests the UP function to assign a UE IP address/prefix to the Traffic Endpoint."})
ies.append({ "ie_type" : "Ethernet PDU Session Information", "ie_value" : "Ethernet PDU Session Information", "presence" : "O", "instance" : "0", "comment" : "This IE may be present to identify all the (DL) Ethernet packets matching an Ethernet PDU session (see clause 5.13.1)."})
ies.append({ "ie_type" : "Framed-Route", "ie_value" : "Framed-Route", "presence" : "O", "instance" : "0", "comment" : "This IE may be present for a DL PDR if the UPF indicated support of Framed Routing (see clause 8.2.25). If present, this IE shall describe a framed route.Several IEs with the same IE type may be present to provision a list of framed routes. (NOTE 3)"})
ies.append({ "ie_type" : "Framed-Routing", "ie_value" : "Framed-Routing", "presence" : "O", "instance" : "0", "comment" : "This IE may be present for a DL PDR if the UPF indicated support of Framed Routing (see clause 8.2.25). If present, this IE shall describe the framed routing associated to a framed route. "})
ies.append({ "ie_type" : "Framed-IPv6-Route", "ie_value" : "Framed-IPv6-Route", "presence" : "O", "instance" : "0", "comment" : "This IE may be present for a DL PDR if the UPF indicated support of Framed Routing (see clause 8.2.25). If present, this IE shall describe a framed IPv6 route.Several IEs with the same IE type may be present to provision a list of framed IPv6 routes. (NOTE 3)"})
ies.append({ "ie_type" : "QFI", "ie_value" : "QFI", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if the UPF has indicated it supports MTE feature as specified in clause 8.2.25.If present, this IE shall identify the QoS Flow Identifier to match for the incoming packet received from the traffic endpoint.Several IEs with the same IE type may be present to provision a list of QFIs. When present, the full set of applicable QFIs shall be provided."})
group_list["Create Traffic Endpoint"] = { "index" : "227", "type" : "127", "ies" : ies }
ies = []
ies.append({ "ie_type" : "MAR ID", "ie_value" : "MAR ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall uniquely identify the MAR among all the MARs configured for that PFCP session."})
ies.append({ "ie_type" : "Steering Functionality", "ie_value" : "Steering Functionality", "presence" : "M", "instance" : "0", "comment" : "This IE shall be present to indicate the applicable traffic steering functionality."})
ies.append({ "ie_type" : "Steering Mode", "ie_value" : "Steering Mode", "presence" : "M", "instance" : "0", "comment" : "This IE shall be present to indicate the steering mode."})
ies.append({ "ie_type" : "Access Forwarding Action Information 1", "ie_value" : "Access Forwarding Action Information 1", "presence" : "M", "instance" : "0", "comment" : "This IE shall be present to provision access specific (non-3gpp or 3gpp) forwarding action information."})
ies.append({ "ie_type" : "Access Forwarding Action Information 2", "ie_value" : "Access Forwarding Action Information 2", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present to provision access specific (non-3gpp or 3gpp) forwarding action information if the UE is registered for both non-3GPP and 3GPP accesses."})
group_list["Create MAR"] = { "index" : "265", "type" : "165", "ies" : ies }
ies = []
ies.append({ "ie_type" : "FAR ID", "ie_value" : "FAR ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall uniquely identify the FAR among all the FARs configured for this PFCP session. "})
ies.append({ "ie_type" : "Weight", "ie_value" : "Weight", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if steering mode is set to Load Balancing to identify the weight of the FAR.(NOTE 1) "})
ies.append({ "ie_type" : "Priority", "ie_value" : "Priority", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the steering mode is set to Active-Standby or Priority-based. (NOTE 2)"})
ies.append({ "ie_type" : "URR ID", "ie_value" : "URR ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall uniquely identify the URR among all the URRs configured for the PFCP session. This enables the SMF to request separate usage reports for different FARs (i.e. different accesses) (NOTE 3)Several IEs within the same IE type may be present to represent a list of URRs to be associated to the FAR."})
group_list["Access Forwarding Action Information 1"] = { "index" : "266", "type" : "166", "ies" : ies }
ies = []
group_list["Access Forwarding Action Information 2"] = { "index" : "267", "type" : "167", "ies" : ies }
ies = []
ies.append({ "ie_type" : "PDR ID", "ie_value" : "PDR ID", "presence" : "M", "instance" : "0", "comment" : ""})
ies.append({ "ie_type" : "F-TEID", "ie_value" : "Local F-TEID", "presence" : "C", "instance" : "0", "comment" : "If the UP function allocates the F-TEID, this IE shall be present and shall contain the local F-TEID to be used for this PDR."})
group_list["Created PDR"] = { "type" : "8", "ies" : ies }
ies.append({ "ie_type" : "UE IP Address", "ie_value" : "UE IP Address", "presence" : "C", "instance" : "0", "comment" : "If the UP function allocates the UE IP address/prefix, this IE shall be present and shall contain the UE IP address/ prefix assigned by the UP function."})
group_list["Created PDR"] = { "index" : "108", "type" : "8", "ies" : ies }
ies = []
ies.append({ "ie_type" : "Sequence Number", "ie_value" : "Load Control Sequence Number", "presence" : "M", "instance" : "0", "comment" : "See subclause 6.2.3.3.2 for the description and use of this parameter."})
ies.append({ "ie_type" : "Metricp", "ie_value" : "Load Metric", "presence" : "M", "instance" : "0", "comment" : "See subclause 6.2.3.3.2 for the description and use of this parameter."})
group_list["Load Control Informationp"] = { "type" : "51", "ies" : ies }
ies.append({ "ie_type" : "Sequence Number", "ie_value" : "Load Control Sequence Number", "presence" : "M", "instance" : "0", "comment" : "See clause 6.2.3.3.2 for the description and use of this parameter."})
ies.append({ "ie_type" : "Metric", "ie_value" : "Load Metric", "presence" : "M", "instance" : "0", "comment" : "See clause 6.2.3.3.2 for the description and use of this parameter."})
group_list["Load Control Information"] = { "index" : "151", "type" : "51", "ies" : ies }
ies = []
ies.append({ "ie_type" : "Sequence Number", "ie_value" : "Overload Control Sequence Number", "presence" : "M", "instance" : "0", "comment" : "See subclause 6.2.4.3.2 for the description and use of this parameter."})
ies.append({ "ie_type" : "Metricp", "ie_value" : "Overload Reduction Metric", "presence" : "M", "instance" : "0", "comment" : "See subclause 6.2.4.3.2 for the description and use of this parameter."})
ies.append({ "ie_type" : "Timer", "ie_value" : "Period of Validity", "presence" : "M", "instance" : "0", "comment" : "See subclause 6.2.4.3.2 for the description and use of this parameter."})
ies.append({ "ie_type" : "Sequence Number", "ie_value" : "Overload Control Sequence Number", "presence" : "M", "instance" : "0", "comment" : "See clause 6.2.4.3.2 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 6.2.4.3.2 for the description and use of this parameter."})
ies.append({ "ie_type" : "Timer", "ie_value" : "Period of Validity", "presence" : "M", "instance" : "0", "comment" : "See clause 6.2.4.3.2 for the description and use of this parameter."})
ies.append({ "ie_type" : "OCI Flags", "ie_value" : "Overload Control Information Flags", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if any of flag in this IE is set. "})
group_list["Overload Control Informationp"] = { "type" : "54", "ies" : ies }
group_list["Overload Control Information"] = { "index" : "154", "type" : "54", "ies" : ies }
ies = []
ies.append({ "ie_type" : "Packet Detection Rule ID", "ie_value" : "PDR ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall uniquely identify the PDR among all the PDRs configured for that PFCP session."})
ies.append({ "ie_type" : "Traffic Endpoint ID", "ie_value" : "Traffic Endpoint ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall uniquely identify the Traffic Endpoint for that Sx session."})
ies.append({ "ie_type" : "F-TEID", "ie_value" : "Local F-TEID", "presence" : "C", "instance" : "0", "comment" : "If the UP function allocates the F-TEID, this IE shall be present and shall contain the local F-TEID to be used for this Traffic Endpoint."})
ies.append({ "ie_type" : "UE IP Address", "ie_value" : "UE IP Address", "presence" : "C", "instance" : "0", "comment" : "If the UP function allocates the UE IP address/prefix, this IE shall be present and shall contain the UE IP address/ prefix assigned by the UP function."})
group_list["Created Traffic Endpoint"] = { "index" : "228", "type" : "128", "ies" : ies }
ies = []
ies.append({ "ie_type" : "PDR ID", "ie_value" : "PDR ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall uniquely identify the PDR among all the PDRs configured for that PFCP session."})
ies.append({ "ie_type" : "Outer Header Removal", "ie_value" : "Outer Header Removal", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if it needs to be changed."})
ies.append({ "ie_type" : "Precedence", "ie_value" : "Precedence", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if there is a change in the PDRs precedence to be applied by the UP function among all PDRs of the PFCP session, when looking for a PDR matching an incoming packet."})
ies.append({ "ie_type" : "PDI", "ie_value" : "PDI", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if there is a change within the PDI against which incoming packets will be matched. When present, this IE shall replace the PDI previously stored in the UP function for this PDR. See Table 7.5.2.2-2."})
@ -106,119 +176,160 @@ ies.append({ "ie_type" : "URR ID", "ie_value" : "URR ID", "presence" : "C", "ins
ies.append({ "ie_type" : "QER ID", "ie_value" : "QER ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a QoS enforcement action shall be applied or no longer applied to packets matching this PDR.When present, this IE shall contain the list of all the QER IDs to be associated to the PDR."})
ies.append({ "ie_type" : "Activate Predefined Rules", "ie_value" : "Activate Predefined Rules", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if new Predefined Rule(s) needs to be activated for the PDR. When present this IE shall contain one Predefined Rules name.Several IEs with the same IE type may be present to represent multiple Activate Predefined Rules names."})
ies.append({ "ie_type" : "Deactivate Predefined Rules", "ie_value" : "Deactivate Predefined Rules", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if Predefined Rule(s) needs to be deactivated for the PDR. When present this IE shall contain one Predefined Rules name.Several IEs with the same IE type may be present to represent multiple Activate Predefined Rules names."})
group_list["Update PDR"] = { "type" : "9", "ies" : ies }
ies.append({ "ie_type" : "Activation Time", "ie_value" : "Activation Time", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if the PDR activation time shall be changed. (NOTE 2)"})
ies.append({ "ie_type" : "Deactivation Time", "ie_value" : "Deactivation Time", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if the PDR deactivation time shall be changed. (NOTE 2)"})
group_list["Update PDR"] = { "index" : "109", "type" : "9", "ies" : ies }
ies = []
ies.append({ "ie_type" : "FAR ID", "ie_value" : "FAR ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the FAR to be updated."})
ies.append({ "ie_type" : "Apply Action", "ie_value" : "Apply Action", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if it is changed."})
ies.append({ "ie_type" : "Update Forwarding Parameters", "ie_value" : "Update Forwarding parameters", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if it is changed.See table 7.5.4.3-2."})
ies.append({ "ie_type" : "Update Duplicating Parameters", "ie_value" : "Update Duplicating Parameters", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if it is changed. See table 7.5.4.3-3."})
ies.append({ "ie_type" : "BAR ID", "ie_value" : "BAR ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the BAR ID associated to the FAR needs to be modified. See Table 7.5.4.11-1."})
group_list["Update FAR"] = { "type" : "10", "ies" : ies }
ies.append({ "ie_type" : "Update Duplicating Parameters", "ie_value" : "Update Duplicating Parameters", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if it is changed. See table 7.5.4.3-3.Several IEs with the same IE type may be present to request to duplicate the packets to different destinations."})
ies.append({ "ie_type" : "BAR ID", "ie_value" : "BAR ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the BAR ID associated to the FAR needs to be modified. "})
group_list["Update FAR"] = { "index" : "110", "type" : "10", "ies" : ies }
ies = []
ies.append({ "ie_type" : "Destination Interface", "ie_value" : "Destination Interface", "presence" : "C", "instance" : "0", "comment" : "This IE shall only be provided if it is changed. When present, it shall indicate the destination interface of the outgoing packet."})
ies.append({ "ie_type" : "Destination Interface", "ie_value" : "Destination Interface", "presence" : "C", "instance" : "0", "comment" : "This IE shall only be provided if it is changed.When present, it shall indicate the destination interface of the outgoing packet."})
ies.append({ "ie_type" : "Network Instance", "ie_value" : "Network instance", "presence" : "C", "instance" : "0", "comment" : "This IE shall only be provided if it is changed."})
ies.append({ "ie_type" : "Redirect Information", "ie_value" : "Redirect Information", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the instructions regarding the redirection of traffic by the UP function need to be modified."})
ies.append({ "ie_type" : "Outer Header Creation", "ie_value" : "Outer Header Creation", "presence" : "C", "instance" : "0", "comment" : "This IE shall only be provided if it is changed"})
ies.append({ "ie_type" : "Outer Header Creation", "ie_value" : "Outer Header Creation", "presence" : "C", "instance" : "0", "comment" : "This IE shall only be provided if it is changed. SeeNOTE1."})
ies.append({ "ie_type" : "Transport Level Marking", "ie_value" : "Transport Level Marking", "presence" : "C", "instance" : "0", "comment" : "This IE shall only be provided if it is changed"})
ies.append({ "ie_type" : "Forwarding Policy", "ie_value" : "Forwarding Policy", "presence" : "C", "instance" : "0", "comment" : "This IE shall only be provided if it is changed"})
ies.append({ "ie_type" : "Forwarding Policy", "ie_value" : "Forwarding Policy", "presence" : "C", "instance" : "0", "comment" : "This IE shall only be provided if it is changed. SeeNOTE1."})
ies.append({ "ie_type" : "Header Enrichment", "ie_value" : "Header Enrichment", "presence" : "C", "instance" : "0", "comment" : "This IE shall only be provided if it is changed"})
ies.append({ "ie_type" : "PFCPSMReq-Flags", "ie_value" : "SxSMReq-Flags", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if at least one of the flags is set to 1. - SNDEM (Send End Marker Packets): this IE shall be present if the CP function modifies the F-TEID of the downstream node in the Outer Header Creation IE and the CP function requests the UP function to construct and send GTP-U End Marker messages towards the old F-TEID of the downstream node. "})
group_list["Update Forwarding Parameters"] = { "type" : "11", "ies" : ies }
ies.append({ "ie_type" : "PFCPSMReq-Flags", "ie_value" : "PFCPSMReq-Flags", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if at least one of the flags is set to 1.- SNDEM (Send End Marker Packets): this IE shall be present if the CP function modifies the F-TEID of the downstream node in the Outer Header Creation IE and the CP function requests the UP function to construct and send GTP-U End Marker messages towards the old F-TEID of the downstream node. "})
ies.append({ "ie_type" : "Traffic Endpoint ID", "ie_value" : "Linked Traffic Endpoint ID", "presence" : "C", "instance" : "0", "comment" : "This IE may be present, if it is changed and the UP function indicated support of the PDI optimization feature, (see clause 8.2.25). When present, it shall identify the Traffic Endpoint ID allocated for this PFCP session to receive the traffic in the reverse direction (see clause 5.2.3.1)."})
ies.append({ "ie_type" : "3GPP Interface Type", "ie_value" : "Destination Interface Type", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present to indicate the 3GPP interface type of the destination interface, if the value has changed."})
group_list["Update Forwarding Parameters"] = { "index" : "111", "type" : "11", "ies" : ies }
ies = []
ies.append({ "ie_type" : "Destination Interface", "ie_value" : "Destination Interface", "presence" : "C", "instance" : "0", "comment" : "This IE shall only be provided if it is changed. When present, it shall indicate the destination interface of the outgoing packet."})
ies.append({ "ie_type" : "Outer Header Creation", "ie_value" : "Outer Header Creation", "presence" : "C", "instance" : "0", "comment" : "This IE shall only be provided if it is changed."})
ies.append({ "ie_type" : "Destination Interface", "ie_value" : "Destination Interface", "presence" : "C", "instance" : "0", "comment" : "This IE shall only be provided if it is changed.When present, it shall indicate the destination interface of the outgoing packet."})
ies.append({ "ie_type" : "Outer Header Creation", "ie_value" : "Outer Header Creation", "presence" : "C", "instance" : "0", "comment" : "This IE shall only be provided if it is changed. SeeNOTE1."})
ies.append({ "ie_type" : "Transport Level Marking", "ie_value" : "Transport Level Marking", "presence" : "C", "instance" : "0", "comment" : "This IE shall only be provided if it is changed."})
ies.append({ "ie_type" : "Forwarding Policy", "ie_value" : "Forwarding Policy", "presence" : "C", "instance" : "0", "comment" : "This IE shall only be provided if it is changed."})
group_list["Update Duplicating Parameters"] = { "type" : "105", "ies" : ies }
ies.append({ "ie_type" : "Forwarding Policy", "ie_value" : "Forwarding Policy", "presence" : "C", "instance" : "0", "comment" : "This IE shall only be provided if it is changed. SeeNOTE1."})
group_list["Update Duplicating Parameters"] = { "index" : "205", "type" : "105", "ies" : ies }
ies = []
ies.append({ "ie_type" : "URR ID", "ie_value" : "URR ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall uniquely identify the URR among all the URRs configured for that PFCP session"})
ies.append({ "ie_type" : "Measurement Method", "ie_value" : "Measurement Method", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the measurement method needs to be modified. When present, this IE shall indicate the method for measuring the network resources usage, i.e. whether the data volume, duration (i.e. time), combined volume/duration, or event shall be measured."})
ies.append({ "ie_type" : "Reporting Triggers", "ie_value" : "Reporting Triggers", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the reporting triggers needs to be modified. When present, this IE shall indicate the trigger(s) for reporting network resources usage to the CP function, e.g. periodic reporting or reporting upon reaching a threshold, or envelope closure."})
ies.append({ "ie_type" : "Measurement Period", "ie_value" : "Measurement Period", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Measurement Period needs to be modified. When present, it shall indicate the period for generating and reporting usage reports. "})
ies.append({ "ie_type" : "Measurement Method", "ie_value" : "Measurement Method", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the measurement method needs to be modified.When present, this IE shall indicate the method for measuring the network resources usage, i.e. whether the data volume, duration (i.e. time), combined volume/duration, or event shall be measured."})
ies.append({ "ie_type" : "Reporting Triggers", "ie_value" : "Reporting Triggers", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the reporting triggers needs to be modified.When present, this IE shall indicate the trigger(s) for reporting network resources usage to the CP function, e.g. periodic reporting or reporting upon reaching a threshold, or envelope closure."})
ies.append({ "ie_type" : "Measurement Period", "ie_value" : "Measurement Period", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Measurement Period needs to be modified.When present, it shall indicate the period for generating and reporting usage reports. "})
ies.append({ "ie_type" : "Volume Threshold", "ie_value" : "Volume Threshold", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Volume Threshold needs to be modified. When present, it shall indicate the traffic volume value after which the UP function shall report network resources usage to the CP function for this URR."})
ies.append({ "ie_type" : "Volume Quota", "ie_value" : "Volume Quota", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Volume Quota needs to be modified. When present, it shall indicate the Volume Quota value."})
ies.append({ "ie_type" : "Volume Quota", "ie_value" : "Volume Quota", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Volume Quota needs to be modified.When present, it shall indicate the Volume Quota value."})
ies.append({ "ie_type" : "Time Threshold", "ie_value" : "Time Threshold", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Time Threshold needs to be modified. When present, it shall indicate the time usage after which the UP function shall report network resources usage to the CP function for this URR."})
ies.append({ "ie_type" : "Time Quota", "ie_value" : "Time Quota", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Time Quota needs to be modified. When present, it shall indicate the Time Quota value."})
ies.append({ "ie_type" : "Quota Holding Time", "ie_value" : "Quota Holding Time", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Quota Holding Time needs to be modified. When present, it shall contain the duration of the Quota Holding Time."})
ies.append({ "ie_type" : "Dropped DL Traffic Threshold", "ie_value" : "Dropped DL Traffic Threshold", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Dropped DL Threshold needs to be modified. When present, it shall contain the threshold of the DL traffic being dropped."})
ies.append({ "ie_type" : "Time Quota", "ie_value" : "Time Quota", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Time Quota needs to be modified.When present, it shall indicate the Time Quota value."})
ies.append({ "ie_type" : "Event Threshold", "ie_value" : "Event Threshold", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if Event Threshold needs to be modified.When present, it shall indicate the number of events after which the UP function shall report to the CP function for this URR."})
ies.append({ "ie_type" : "Event Quota", "ie_value" : "Event Quota", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if Event Quota needs to be modified.When present, it shall indicate the Event Quota value."})
ies.append({ "ie_type" : "Quota Holding Time", "ie_value" : "Quota Holding Time", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Quota Holding Time needs to be modified.When present, it shall contain the duration of the Quota Holding Time."})
ies.append({ "ie_type" : "Dropped DL Traffic Threshold", "ie_value" : "Dropped DL Traffic Threshold", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Dropped DL Threshold needs to be modified.When present, it shall contain the threshold of the DL traffic being dropped."})
ies.append({ "ie_type" : "Quota Validity Time", "ie_value" : "Quota Validity Time", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if Quota Validity time was not sent earlier or quota validity time value needs to be modified."})
ies.append({ "ie_type" : "Monitoring Time", "ie_value" : "Monitoring Time", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Monitoring Time needs to be modified. When present, this IE shall contain the time at which the UP function shall re-apply the volume or time threshold. "})
ies.append({ "ie_type" : "Subsequent Volume Threshold", "ie_value" : "Subsequent Volume Threshold", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Subsequent Volume Threshold needs to be modified and volume-based measurement is used. When present, it shall indicate the traffic volume value after which the UP function shall report network resources usage to the CP function for this URR for the period after the Monitoring Time."})
ies.append({ "ie_type" : "Subsequent Volume Threshold", "ie_value" : "Subsequent Volume Threshold", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Subsequent Volume Threshold needs to be modified and volume-based measurement is used.When present, it shall indicate the traffic volume value after which the UP function shall report network resources usage to the CP function for this URR for the period after the Monitoring Time."})
ies.append({ "ie_type" : "Subsequent Time Threshold", "ie_value" : "Subsequent Time Threshold", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Subsequent Time Threshold needs to be modified. When present, it shall indicate the time usage value after which the UP function shall report network resources usage to the CP function for this URR for the period after the Monitoring Time."})
ies.append({ "ie_type" : "Subsequent Volume Quota", "ie_value" : "Subsequent Volume Quota", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Subsequent Volume Quota needs to be modified. When present, it shall indicate the Volume Quota value which the UP function shall use for this URR for the period after the Monitoring Time."})
ies.append({ "ie_type" : "Subsequent Time Quota", "ie_value" : "Subsequent Time Quota", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Subsequent Time Quota needs to be modified. When present, it shall indicate the Time Quota value which the UP function shall use for this URR for the period after the Monitoring Time."})
ies.append({ "ie_type" : "Inactivity Detection Time", "ie_value" : "Inactivity Detection Time", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Inactivity Detection Time needs to be modified. When present, it shall indicate the duration of the inactivity period after which time measurement needs to be suspended when no packets are received during this inactivity period. "})
ies.append({ "ie_type" : "Linked URR ID", "ie_value" : "Linked URR ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if linked usage reporting is required. When present, this IE shall contain the linked URR ID which is related with this URR (see subclause 5.2.2.4). "})
ies.append({ "ie_type" : "Measurement Information", "ie_value" : "Measurement Information", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if any of the following flag is set to 1.Applicable flags are:- Inactive Measurement Flag: this flag shall be set to 1 if the measurement shall be paused (inactive). The measurement shall be performed (active) if the bit is set to 0 or if the Measurement Information IE is not present in the Update URR IE. - Reduced Application Detection Information Flag: this flag may be set to 1, if the Reporting Triggers request to report the start or stop of application, to request the UP function to only report the Application ID in the Application Detection Information, e.g. for envelope reporting."})
ies.append({ "ie_type" : "Subsequent Volume Quota", "ie_value" : "Subsequent Volume Quota", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Subsequent Volume Quota needs to be modified.When present, it shall indicate the Volume Quota value which the UP function shall use for this URR for the period after the Monitoring Time."})
ies.append({ "ie_type" : "Subsequent Time Quota", "ie_value" : "Subsequent Time Quota", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Subsequent Time Quota needs to be modified.When present, it shall indicate the Time Quota value which the UP function shall use for this URR for the period after the Monitoring Time."})
ies.append({ "ie_type" : "Subsequent Event Threshold", "ie_value" : "Subsequent Event Threshold", "presence" : "O", "instance" : "0", "comment" : "This IE shall be present if the Subsequent Event Threshold needs to be modified.When present, it shall indicate the number of events after which the UP function shall report to the CP function for this URR for the period after the Monitoring Time."})
ies.append({ "ie_type" : "Subsequent Event Quota", "ie_value" : "Subsequent Event Quota", "presence" : "O", "instance" : "0", "comment" : "This IE shall be present if the Subsequent Event Quota needs to be modified.When present, it shall indicate the Event Quota value which the UP function shall use for this URR for the period after the Monitoring Time."})
ies.append({ "ie_type" : "Inactivity Detection Time", "ie_value" : "Inactivity Detection Time", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Inactivity Detection Time needs to be modified.When present, it shall indicate the duration of the inactivity period after which time measurement needs to be suspended when no packets are received during this inactivity period. "})
ies.append({ "ie_type" : "Linked URR ID", "ie_value" : "Linked URR ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if linked usage reporting is required. When present, this IE shall contain the linked URR ID which is related with this URR (see clause 5.2.2.4).Several IEs with the same IE type may be present to represent multiple linked URRs which are related with this URR."})
ies.append({ "ie_type" : "Measurement Information", "ie_value" : "Measurement Information", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if any of the following flag is set to 1.Applicable flags are:- Inactive Measurement Flag: this flag shall be set to 1 if the measurement shall be paused (inactive). The measurement shall be performed (active) if the bit is set to 0 or if the Measurement Information IE is not present in the Update URR IE.- Reduced Application Detection Information Flag: this flag may be set to 1, if the Reporting Triggers request to report the start or stop of application, to request the UP function to only report the Application ID in the Application Detection Information, e.g. for envelope reporting.- Immediate Start Time Metering Flag: this flag may be set to 1 if time-based measurement is used and the UP function is requested to start the time metering immediately at receiving the flag."})
ies.append({ "ie_type" : "Time Quota Mechanism", "ie_value" : "Time Quota Mechanism", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if time-based measurement based on CTP or DTP needs to be modified."})
ies.append({ "ie_type" : "Aggregated URRs", "ie_value" : "Aggregated URRs", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if the Aggregated URRs IE needs to be modified. See Table 7.5.2.4-1.Several IEs with the same IE type may be present to provision multiple aggregated URRs.When present, this IE shall provide the complete list of the aggregated URRs."})
group_list["Update URR"] = { "type" : "13", "ies" : ies }
ies.append({ "ie_type" : "Aggregated URRs", "ie_value" : "Aggregated URRs", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if the Aggregated URRs IE needs to be modified. See Table 7.5.2.4-2.Several IEs with the same IE type may be present to provision multiple aggregated URRs.When present, this IE shall provide the complete list of the aggregated URRs."})
ies.append({ "ie_type" : "FAR ID", "ie_value" : "FAR ID for Quota Action", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the FAR ID for Quota Action IE needs to be modified. This IE may be present if the Volume Quota IE or the Time Quota IE or Event Quota IE is newly provisioned in the URR and the UP Function indicated support of the Quota Action.When present, it shall contain the identifier of the substitute FAR the UP function shall apply, for the traffic associated to this URR, when exhausting any of these quotas. See NOTE 1. "})
ies.append({ "ie_type" : "Ethernet Inactivity Timer", "ie_value" : "Ethernet Inactivity Timer", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Ethernet Inactivity Timer needs to be modified. When present, it shall contain the duration of the Ethernet inactivity period."})
ies.append({ "ie_type" : "Additional Monitoring Time", "ie_value" : "Additional Monitoring Time", "presence" : "O", "instance" : "0", "comment" : "This IE shall be present if the additional Monitoring Time needs to be modified. When present, this IE shall contain the time at which the UP function shall re-apply the volume or time or event threshold/quota. See Table 7.5.2.4-3.The CP function shall provide the full set of Additional Monitoring Times IE(s). The UP function shall replace any Additional Monitoring Times IE(s) provisioned earlier by the new set of received IE(s)."})
group_list["Update URR"] = { "index" : "113", "type" : "13", "ies" : ies }
ies = []
ies.append({ "ie_type" : "QER ID", "ie_value" : "QER ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall uniquely identify the QER among all the QRs configured for that PFCP session"})
ies.append({ "ie_type" : "QER Correlation ID", "ie_value" : "QER Correlation ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the QER correlation ID in this QER needs to be modified.See NOTE 1."})
ies.append({ "ie_type" : "Gate Status", "ie_value" : "Gate Status", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Gate Status needs to be modified. When present, it shall indicate whether the packets are allowed to be forwarded (the gate is open) or shall be discarded (the gate is closed) in the uplink and/or downlink directions.See NOTE 1."})
ies.append({ "ie_type" : "MBR", "ie_value" : "Maximum Bitrate", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if an MBR enforcement action applied to packets matching this PDR need to be modified. When present, this IE shall indicate the uplink and/or downlink maximum bit rate to be enforced for packets matching the PDR.This IE may be set to the value of: - the APN-AMBR, for a QER that is referenced by all the PDRs of the non-GBR bearers of a PDN connection; - the TDF session MBR, for a QER that is referenced by all the PDRs of a TDF session;- the bearer MBR, for a QER that is referenced by all the PDRs of a bearer;- the SDF MBR, for a QER that is referenced by all the PDRs of a SDF.See NOTE 1."})
ies.append({ "ie_type" : "GBR", "ie_value" : "Guaranteed Bitrate", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a GBR authorization to packets matching this PDR needs to be modified. When present, this IE shall indicate the authorized uplink and/or downlink guaranteed bit rate.This IE may be set to the value of: - the aggregate GBR, for a QER that is referenced by all the PDRs of a GBR bearer;- the SDF GBR, for a QER that is referenced by all the PDRs of a SDF.See NOTE 1."})
ies.append({ "ie_type" : "MBR", "ie_value" : "Maximum Bitrate", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if an MBR enforcement action applied to packets matching this PDR need to be modified.When present, this IE shall indicate the uplink and/or downlink maximum bit rate to be enforced for packets matching the PDR.For EPC, this IE may be set to the value of:- the APN-AMBR, for a QER that is referenced by all the PDRs of the non-GBR bearers of a PDN connection;- the TDF session MBR, for a QER that is referenced by all the PDRs of a TDF session;- the bearer MBR, for a QER that is referenced by all the PDRs of a bearer;- the SDF MBR, for a QER that is referenced by all the PDRs of a SDF.For 5GC, this IE may be set to the value of:- the Session-AMBR, for a QER that is referenced by all the PDRs of the non-GBR QoS flows of a PDU session;- the QoS Flow MBR, for a QER that is referenced by all the PDRs of a QoS Flow;- the SDF MBR, for a QER that is referenced by all the PDRs of a SDF.See NOTE 1."})
ies.append({ "ie_type" : "GBR", "ie_value" : "Guaranteed Bitrate", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a GBR authorization to packets matching this PDR needs to be modified. When present, this IE shall indicate the authorized uplink and/or downlink guaranteed bit rate.This IE may be set to the value of:- the aggregate GBR, for a QER that is referenced by all the PDRs of a GBR bearer;- the QoS Flow GBR, for a QER that is referenced by all the PDRs of a QoS Flow (for 5GC);- the SDF GBR, for a QER that is referenced by all the PDRs of a SDF.See NOTE 1."})
ies.append({ "ie_type" : "Packet Rate", "ie_value" : "Packet Rate", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a Packet Rate enforcement action (in terms of number of packets per time interval) need to be modified for packets matching this PDR. "})
ies.append({ "ie_type" : "DL Flow Level Marking", "ie_value" : "DL Flow Level Marking", "presence" : "C", "instance" : "0", "comment" : "This IE shall be set if the DL Flow Level Marking IE needs to be modified.See NOTE 1."})
ies.append({ "ie_type" : "QFI", "ie_value" : "QoS flow identifier", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if it needs to be modified."})
ies.append({ "ie_type" : "RQI", "ie_value" : "Reflective QoS", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if it needs to be modified."})
group_list["Update QER"] = { "type" : "14", "ies" : ies }
ies.append({ "ie_type" : "Paging Policy Indicator", "ie_value" : "Paging Policy Indicator", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if it needs to be modified."})
ies.append({ "ie_type" : "Averaging Window", "ie_value" : "Averaging Window", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if the UP function is required to modify the Averaging Window. (NOTE 2)"})
group_list["Update QER"] = { "index" : "114", "type" : "14", "ies" : ies }
ies = []
ies.append({ "ie_type" : "Packet Detection Rule ID", "ie_value" : "PDR ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the PDR to be deleted."})
group_list["Remove PDR"] = { "type" : "15", "ies" : ies }
ies.append({ "ie_type" : "PDR ID", "ie_value" : "PDR ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the PDR to be deleted."})
group_list["Remove PDR"] = { "index" : "115", "type" : "15", "ies" : ies }
ies = []
ies.append({ "ie_type" : "FAR ID", "ie_value" : "FAR ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the FAR to be deleted."})
group_list["Remove FAR"] = { "type" : "16", "ies" : ies }
group_list["Remove FAR"] = { "index" : "116", "type" : "16", "ies" : ies }
ies = []
ies.append({ "ie_type" : "URR ID", "ie_value" : "URR ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the URR to be deleted."})
group_list["Remove URR"] = { "type" : "17", "ies" : ies }
group_list["Remove URR"] = { "index" : "117", "type" : "17", "ies" : ies }
ies = []
ies.append({ "ie_type" : "QER ID", "ie_value" : "QER ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the QER to be deleted."})
group_list["Remove QER"] = { "type" : "18", "ies" : ies }
group_list["Remove QER"] = { "index" : "118", "type" : "18", "ies" : ies }
ies = []
ies.append({ "ie_type" : "URR ID", "ie_value" : "URR ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the URR being queried."})
group_list["Query URR"] = { "type" : "77", "ies" : ies }
group_list["Query URR"] = { "index" : "177", "type" : "77", "ies" : ies }
ies = []
ies.append({ "ie_type" : "BAR ID", "ie_value" : "BAR ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the BAR Rule to be modified."})
ies.append({ "ie_type" : "Downlink Data Notification Delay", "ie_value" : "Downlink Data Notification Delay", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function indicated support of the Downlink Data Notification Delay parameter (see subclause 8.2.28) and the Downlink Data Notification Delay needs to be modified.When present, it shall contain the delay the UP function shall apply between receiving a downlink data packet and notifying the CP function about it, when the Apply Action parameter requests to buffer the packets and notify the CP function."})
group_list["Update BAR Session Modification Request"] = { "type" : "86", "ies" : ies }
ies.append({ "ie_type" : "Downlink Data Notification Delay", "ie_value" : "Downlink Data Notification Delay", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function indicated support of the Downlink Data Notification Delay parameter (see clause 8.2.28) and the Downlink Data Notification Delay needs to be modified.When present, it shall contain the delay the UP function shall apply between receiving a downlink data packet and notifying the CP function about it, when the Apply Action parameter requests to buffer the packets and notify the CP function."})
ies.append({ "ie_type" : "Suggested Buffering Packets Count", "ie_value" : "Suggested Buffering Packets Count", "presence" : "C", "instance" : "0", "comment" : "This IE may be present if the UP Function indicated support of the the feature UDBC.When present, it shall contain the number of packets that are suggested to be buffered when the Apply Action parameter requests to buffer the packets. The packets that exceed the limit shall be discarded."})
group_list["Update BAR Session Modification Request"] = { "index" : "186", "type" : "86", "ies" : ies }
ies = []
ies.append({ "ie_type" : "BAR ID", "ie_value" : "BAR ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the BAR to be deleted."})
group_list["Remove BAR"] = { "type" : "87", "ies" : ies }
group_list["Remove BAR"] = { "index" : "187", "type" : "87", "ies" : ies }
ies = []
ies.append({ "ie_type" : "Traffic Endpoint ID", "ie_value" : "Traffic Endpoint ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the Traffic Endpoint to be deleted."})
group_list["Remove Traffic Endpoint"] = { "index" : "230", "type" : "130", "ies" : ies }
ies = []
ies.append({ "ie_type" : "MAR ID", "ie_value" : "MAR ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the MAR to be deleted."})
group_list["Remove MAR"] = { "index" : "268", "type" : "168", "ies" : ies }
ies = []
ies.append({ "ie_type" : "MAR ID", "ie_value" : "MAR ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the MAR to be updated."})
ies.append({ "ie_type" : "Steering Functionality", "ie_value" : "Steering Functionality", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if it is changed."})
ies.append({ "ie_type" : "Steering Mode", "ie_value" : "Steering Mode", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if it is changed."})
ies.append({ "ie_type" : "Update Access Forwarding Action Information 1", "ie_value" : "Update Access Forwarding Action Information 1", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Access Forwarding Action Information 1 was provisioned previously and if any of IEs is to be changed.This IE shall also be present to remove Access Forwarding Action Information 1 that was provisioned previously if the UE deregisters from the corresponding access. This shall be done by including this IE with a null length."})
ies.append({ "ie_type" : "Update Access Forwarding Action Information 2", "ie_value" : "Update Access Forwarding Action Information 2", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Access Forwarding Action Information 2 was provisioned previously and if any of IEs is to be changed.This IE shall also be present to remove Access Forwarding Action Information 2 that was provisioned previously if the UE deregisters from the corresponding access. This shall be done by including this IE with a null length."})
ies.append({ "ie_type" : "Access Forwarding Action Information 1", "ie_value" : "Access Forwarding Action Information 1", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present to provision access specific (non-3gpp or 3gpp) forwarding action information when another access is added, i.e. when the UE is registered in both non-3GPP and 3GPP accesses.See Table 7.5.2.8-2. "})
ies.append({ "ie_type" : "Access Forwarding Action Information 2", "ie_value" : "Access Forwarding Action Information 2", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present to provision access specific (non-3gpp or 3gpp) forwarding action information when another access is added, i.e. when the UE is registered in both non-3GPP and 3GPP accesses.See Table 7.5.2.8-3. "})
group_list["Update MAR"] = { "index" : "269", "type" : "169", "ies" : ies }
ies = []
ies.append({ "ie_type" : "FAR ID", "ie_value" : "FAR ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if it is changed. "})
ies.append({ "ie_type" : "Weight", "ie_value" : "Weight", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if it is changed."})
ies.append({ "ie_type" : "Priority", "ie_value" : "Priority", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if it is changed."})
ies.append({ "ie_type" : "URR ID", "ie_value" : "URR ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a measurement action shall be applied or no longer applied to packets for this access.When present, this IE shall contain the list of all the URR IDs to be associated to this access."})
group_list["Update Access Forwarding Action Information 1"] = { "index" : "275", "type" : "175", "ies" : ies }
ies = []
group_list["Update Access Forwarding Action Information 2"] = { "index" : "276", "type" : "176", "ies" : ies }
ies = []
ies.append({ "ie_type" : "URR ID", "ie_value" : "URR ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the URR for which usage is reported."})
ies.append({ "ie_type" : "UR-SEQN", "ie_value" : "UR-SEQN", "presence" : "M", "instance" : "0", "comment" : "This IE shall uniquely identify the Usage Report for the URR (see subclause 5.2.2.3)."})
ies.append({ "ie_type" : "UR-SEQN", "ie_value" : "UR-SEQN", "presence" : "M", "instance" : "0", "comment" : "This IE shall uniquely identify the Usage Report for the URR (see clause 5.2.2.3)."})
ies.append({ "ie_type" : "Usage Report Trigger", "ie_value" : "Usage Report Trigger", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the trigger for this report."})
ies.append({ "ie_type" : "Start Time", "ie_value" : "Start Time", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present, except if the Usage Report Trigger indicates Start of Traffic or Stop of Traffic.When present, this IE shall provide the timestamp when the collection of the information in this report was started."})
ies.append({ "ie_type" : "End Time", "ie_value" : "End Time", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present, except if the Usage Report Trigger indicates Start of Traffic or Stop of Traffic.When present, this IE shall provide the timestamp when the collection of the information in this report was generated."})
ies.append({ "ie_type" : "Start Time", "ie_value" : "Start Time", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present, except if the Usage Report Trigger indicates Start of Traffic, Stop of Traffic or MAC Addresses Reporting.When present, this IE shall provide the timestamp when the collection of the information in this report was started."})
ies.append({ "ie_type" : "End Time", "ie_value" : "End Time", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present, except if the Usage Report Trigger indicates Start of Traffic, Stop of Traffic or MAC Addresses Reporting.When present, this IE shall provide the timestamp when the collection of the information in this report was generated."})
ies.append({ "ie_type" : "Volume Measurement", "ie_value" : "Volume Measurement", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a volume measurement needs to be reported."})
ies.append({ "ie_type" : "Duration Measurement", "ie_value" : "Duration Measurement", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a duration measurement needs to be reported."})
ies.append({ "ie_type" : "Time of First Packet", "ie_value" : "Time of First Packet", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if available for this URR."})
ies.append({ "ie_type" : "Time of Last Packet", "ie_value" : "Time of Last Packet", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if available for this URR."})
ies.append({ "ie_type" : "Usage Information", "ie_value" : "Usage Information", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function reports Usage Reports before and after a Monitoring Time or before and after QoS enforcement. When present, it shall indicate whether the usage is reported for the period before or after that time, or before or after QoS enforcement."})
group_list["Usage Report in Session Modification Response"] = { "type" : "78", "ies" : ies }
ies.append({ "ie_type" : "Query URR Reference", "ie_value" : "Query URR Reference", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if this usage report is sent as a result of a query URR received in an PFCP Session Modification Request and the Query URR Reference IE was present in the PFCP Session Modification Request.When present, it shall be set to the Query URR Reference value received in the PFCP Session Modification Request. "})
ies.append({ "ie_type" : "Ethernet Traffic Information", "ie_value" : "Ethernet Traffic Information", "presence" : "C", "instance" : "0", "comment" : " This IE shall be present if Ethernet Traffic Information needs to be reported. "})
group_list["Usage Report Session Modification Response"] = { "index" : "178", "type" : "78", "ies" : ies }
ies = []
ies.append({ "ie_type" : "URR ID", "ie_value" : "URR ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the URR for which usage is reported."})
ies.append({ "ie_type" : "UR-SEQN", "ie_value" : "UR-SEQN", "presence" : "M", "instance" : "0", "comment" : "This IE shall uniquely identify the Usage Report for the URR (see subclause 5.2.2.3)."})
ies.append({ "ie_type" : "UR-SEQN", "ie_value" : "UR-SEQN", "presence" : "M", "instance" : "0", "comment" : "This IE shall uniquely identify the Usage Report for the URR (see clause 5.2.2.3)."})
ies.append({ "ie_type" : "Usage Report Trigger", "ie_value" : "Usage Report Trigger", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the trigger for this report."})
ies.append({ "ie_type" : "Start Time", "ie_value" : "Start Time", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present, except if the Usage Report Trigger indicates Start of Traffic or Stop of Traffic.When present, this IE shall provide the timestamp when the collection of the information in this report was started."})
ies.append({ "ie_type" : "End Time", "ie_value" : "End Time", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present, except if the Usage Report Trigger indicates Start of Traffic or Stop of Traffic.When present, this IE shall provide the timestamp when the collection of the information in this report was generated."})
ies.append({ "ie_type" : "Start Time", "ie_value" : "Start Time", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present, except if the Usage Report Trigger indicates Start of Traffic, Stop of Traffic or MAC Addresses Reporting.When present, this IE shall provide the timestamp when the collection of the information in this report was started."})
ies.append({ "ie_type" : "End Time", "ie_value" : "End Time", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present, except if the Usage Report Trigger indicates Start of Traffic, Stop of Traffic or MAC Addresses Reporting.When present, this IE shall provide the timestamp when the collection of the information in this report was generated."})
ies.append({ "ie_type" : "Volume Measurement", "ie_value" : "Volume Measurement", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a volume needs to be reported."})
ies.append({ "ie_type" : "Duration Measurement", "ie_value" : "Duration Measurement", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a duration measurement needs to be reported."})
ies.append({ "ie_type" : "Time of First Packet", "ie_value" : "Time of First Packet", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if available for this URR."})
ies.append({ "ie_type" : "Time of Last Packet", "ie_value" : "Time of Last Packet", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if available for this URR."})
ies.append({ "ie_type" : "Usage Information", "ie_value" : "Usage Information", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function reports Usage Reports before and after a Monitoring Time, or before and after QoS enforcement. When present, it shall indicate whether the usage is reported for the period before or after that time, or before or after QoS enforcement."})
group_list["Usage Report Session Deletion Response"] = { "type" : "79", "ies" : ies }
ies.append({ "ie_type" : "Ethernet Traffic Information", "ie_value" : "Ethernet Traffic Information", "presence" : "C", "instance" : "0", "comment" : " This IE shall be present if Ethernet Traffic Information needs to be reported. See Table 7.5.8.3-3."})
group_list["Usage Report Session Deletion Response"] = { "index" : "179", "type" : "79", "ies" : ies }
ies = []
ies.append({ "ie_type" : "Packet Detection Rule ID", "ie_value" : "PDR ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the PDR for which downlink data packets have been received at the UP function. More than one IE with this type may be included to represent multiple PDRs having received downlink data packets."})
ies.append({ "ie_type" : "Downlink Data Service Information", "ie_value" : "Downlink Data Service Information", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included for an PFCP session with an IP PDN type, if the UP function supports the Paging Policy Differentiation feature (see subclause 4.9 of 3GPPTS23.401[14]). When present, for each PDR and for each packet that triggers a Downlink Data Notification, the UP function 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 IETFRFC2474[13]).One IE with this type shall be included per PDR ID reported in the message. When multiple PDR ID IEs are present in the message, the Downlink Data Service Information IEs shall be reported according to the order of the PDR ID IEs."})
group_list["Downlink Data Report"] = { "type" : "83", "ies" : ies }
ies.append({ "ie_type" : "PDR ID", "ie_value" : "PDR ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the PDR for which downlink data packets have been received at the UP function.More than one IE with this type may be included to represent multiple PDRs having received downlink data packets."})
ies.append({ "ie_type" : "Downlink Data Service Information", "ie_value" : "Downlink Data Service Information", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included for an PFCP session with an IP PDN type, if the UP function supports the Paging Policy Differentiation feature (see clause 4.9 of 3GPPTS23.401[14]) and clause 5.4.3.2 of 3GPPTS23.501[28]).When present, for each PDR and for each packet that triggers a Downlink Data Notification, the UP function 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 IETFRFC2474[13]).For 5GC, this IE shall also be included over N4, for each PDR and for each packet that triggers a Downlink Data Notification, if the QFI of the downlink data packet is available.One IE with this type shall be included per PDR ID reported in the message. When multiple PDR ID IEs are present in the message, the Downlink Data Service Information IEs shall be reported according to the order of the PDR ID IEs."})
group_list["Downlink Data Report"] = { "index" : "183", "type" : "83", "ies" : ies }
ies = []
ies.append({ "ie_type" : "URR ID", "ie_value" : "URR ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the URR for which usage is reported."})
ies.append({ "ie_type" : "UR-SEQN", "ie_value" : "UR-SEQN", "presence" : "M", "instance" : "0", "comment" : "This IE shall uniquely identify the Usage Report for the URR (see subclause 5.2.2.3)."})
ies.append({ "ie_type" : "UR-SEQN", "ie_value" : "UR-SEQN", "presence" : "M", "instance" : "0", "comment" : "This IE shall uniquely identify the Usage Report for the URR (see clause 5.2.2.3)."})
ies.append({ "ie_type" : "Usage Report Trigger", "ie_value" : "Usage Report Trigger", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the trigger for this report."})
ies.append({ "ie_type" : "Start Time", "ie_value" : "Start Time", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present, except if the Usage Report Trigger indicates Start of Traffic or Stop of Traffic.When present, this IE shall provide the timestamp when the collection of the information in this report was started."})
ies.append({ "ie_type" : "End Time", "ie_value" : "End Time", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present, except if the Usage Report Trigger indicates Start of Traffic or Stop of Traffic.When present, this IE shall provide the timestamp when the collection of the information in this report was generated."})
ies.append({ "ie_type" : "Start Time", "ie_value" : "Start Time", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present, except if the Usage Report Trigger indicates Start of Traffic, Stop of Traffic or MAC Addresses Reporting.When present, this IE shall provide the timestamp when the collection of the information in this report was started."})
ies.append({ "ie_type" : "End Time", "ie_value" : "End Time", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present, except if the Usage Report Trigger indicates Start of Traffic, Stop of Traffic or MAC Addresses Reporting.When present, this IE shall provide the timestamp when the collection of the information in this report was generated."})
ies.append({ "ie_type" : "Volume Measurement", "ie_value" : "Volume Measurement", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a volume measurement needs to be reported."})
ies.append({ "ie_type" : "Duration Measurement", "ie_value" : "Duration Measurement", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a duration measurement needs to be reported."})
ies.append({ "ie_type" : "Application Detection Information", "ie_value" : "Application Detection Information", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if application detection information needs to be reported."})
@ -227,18 +338,26 @@ ies.append({ "ie_type" : "Network Instance", "ie_value" : "Network Instance", "p
ies.append({ "ie_type" : "Time of First Packet", "ie_value" : "Time of First Packet", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if available for this URR."})
ies.append({ "ie_type" : "Time of Last Packet", "ie_value" : "Time of Last Packet", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if available for this URR."})
ies.append({ "ie_type" : "Usage Information", "ie_value" : "Usage Information", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function reports Usage Reports before and after a Monitoring Time, or before and after QoS enforcement. When present, it shall indicate whether the usage is reported for the period before or after that time, or before or after QoS enforcement."})
group_list["Usage Report Session Report Request"] = { "type" : "80", "ies" : ies }
ies.append({ "ie_type" : "Query URR Reference", "ie_value" : "Query URR Reference", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if this usage report is sent as a result of a query URR received in an PFCP Session Modification Request and the Query URR Reference IE was present in the PFCP Session Modification Request.When present, it shall be set to the Query URR Reference value received in the PFCP Session Modification Request. "})
ies.append({ "ie_type" : "Event Time Stamp", "ie_value" : "Event Time Stamp", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present, if the report is related to an event.When present, it shall be set to the time when the event occurs.Several IEs with the same IE type may be present to report multiple occurrences for an event for this URR ID."})
ies.append({ "ie_type" : "Ethernet Traffic Information", "ie_value" : "Ethernet Traffic Information", "presence" : "C", "instance" : "0", "comment" : " This IE shall be present if Ethernet Traffic Information needs to be reported. See Table 7.5.8.3-3."})
group_list["Usage Report Session Report Request"] = { "index" : "180", "type" : "80", "ies" : ies }
ies = []
ies.append({ "ie_type" : "Application ID", "ie_value" : "Application ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the Application ID for which a start or stop of traffic is reported."})
ies.append({ "ie_type" : "Application Instance ID", "ie_value" : "Application Instance ID", "presence" : "C", "instance" : "0", "comment" : "When present, this IE shall identify the Application Instance Identifier for which a start or stop of traffic is reported. It shall be present, when reporting the start of an application, if the Reduced Application Detection Information flag was not set in the Measurement Information and if the flow information for the detected application is deducible. It shall be present, when reporting the stop of an application, if the Reduced Application Detection Information flag was not set in the Measurement Information and if it was provided when reporting the start of the application."})
ies.append({ "ie_type" : "Flow Information", "ie_value" : "Flow Information", "presence" : "C", "instance" : "0", "comment" : "When present, this IE shall contain the flow information for the detected application. It shall be present, when reporting the start of an application, if the Reduced Application Detection Information flag was not set in the Measurement Information and if the flow information for the detected application is deducible."})
group_list["Application Detection Information"] = { "type" : "68", "ies" : ies }
group_list["Application Detection Information"] = { "index" : "168", "type" : "68", "ies" : ies }
ies = []
ies.append({ "ie_type" : "F-TEID", "ie_value" : "Remote F-TEID", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the remote F-TEID of the GTP-U bearer for which an Error Indication has been received at the UP function. More than one IE with this type may be included to represent multiple remote F-TEID for which an Error Indication has been received."})
group_list["Error Indication Report"] = { "type" : "99", "ies" : ies }
ies.append({ "ie_type" : "MAC Addresses Detected", "ie_value" : "MAC Addresses Detected", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if one or more new MAC addresses have been detected.When present, it shall identify the MAC (Ethernet) addresses newly detected as source address of frames sent UL by the UE."})
ies.append({ "ie_type" : "MAC Addresses Removed", "ie_value" : "MAC Addresses Removed", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if one or more new MAC addresses have been removed.When present, it shall identify the MAC (Ethernet) addresses that have been inactive for a duration exceeding the Ethernet inactivity Timer. "})
group_list["Ethernet Traffic Information"] = { "index" : "243", "type" : "143", "ies" : ies }
ies = []
ies.append({ "ie_type" : "F-TEID", "ie_value" : "Remote F-TEID", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the remote F-TEID of the GTP-U bearer for which an Error Indication has been received at the UP function.More than one IE with this type may be included to represent multiple remote F-TEID for which an Error Indication has been received."})
group_list["Error Indication Report"] = { "index" : "199", "type" : "99", "ies" : ies }
ies = []
ies.append({ "ie_type" : "BAR ID", "ie_value" : "BAR ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the BAR Rule to be modified."})
ies.append({ "ie_type" : "Downlink Data Notification Delay", "ie_value" : "Downlink Data Notification Delay", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function indicated support of the Downlink Data Notification Delay parameter (see subclause 8.2.25) and the Downlink Data Notification Delay needs to be modified.When present, it shall contain the delay the UP function shall apply between receiving a downlink data packet and notifying the CP function about it, when the Apply Action parameter requests to buffer the packets and notify the CP function."})
ies.append({ "ie_type" : "DL Buffering Duration", "ie_value" : "DL Buffering Duration", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function indicated support of the DL Buffering Duration parameter (see subclause 8.2.25) and extended buffering of downlink data packet is required in the UP function. When present, this IE shall indicate the duration during which the UP function shall buffer the downlink data packets without sending any further notification to the CP function about the arrival of DL data packets."})
ies.append({ "ie_type" : "DL Buffering Suggested Packet Count", "ie_value" : "DL Buffering Suggested Packet Count", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if extended buffering of downlink data packet is required in the UP function. When present, this IE shall indicate the maximum number of downlink data packets suggested to be buffered in the UP function."})
group_list["Update BAR PFCP Session Report Response"] = { "type" : "12", "ies" : ies }
ies.append({ "ie_type" : "Downlink Data Notification Delay", "ie_value" : "Downlink Data Notification Delay", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function indicated support of the Downlink Data Notification Delay parameter (see clause 8.2.25) and the Downlink Data Notification Delay needs to be modified.When present, it shall contain the delay the UP function shall apply between receiving a downlink data packet and notifying the CP function about it, when the Apply Action parameter requests to buffer the packets and notify the CP function."})
ies.append({ "ie_type" : "DL Buffering Duration", "ie_value" : "DL Buffering Duration", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function indicated support of the DL Buffering Duration parameter (see clause 8.2.25) and extended buffering of downlink data packet is required in the UP function.When present, this IE shall indicate the duration during which the UP function shall buffer the downlink data packets without sending any further notification to the CP function about the arrival of DL data packets."})
ies.append({ "ie_type" : "DL Buffering Suggested Packet Count", "ie_value" : "DL Buffering Suggested Packet Count", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if extended buffering of downlink data packet is required in the UP function.When present, this IE shall indicate the maximum number of downlink data packets suggested to be buffered in the UP function."})
ies.append({ "ie_type" : "Suggested Buffering Packets Count", "ie_value" : "Suggested Buffering Packets Count", "presence" : "C", "instance" : "0", "comment" : "This IE may be present if the UP Function indicated support of the feature UDBC.When present, it shall contain the number of packets that are suggested to be buffered when the Apply Action parameter requests to buffer the packets. The packets that exceed the limit shall be discarded."})
group_list["Update BAR PFCP Session Report Response"] = { "index" : "112", "type" : "12", "ies" : ies }

View File

@ -1,3 +1,3 @@
ies = []
ies.append({ "ie_type" : "Recovery Time Stamp", "ie_value" : "Recovery Time Stamp", "presence" : "M", "instance" : "0", "comment" : "This IE shall contain the time stamp when the node was started see clause 19A of 3GPPTS23.007[24]."})
ies.append({ "ie_type" : "Recovery Time Stamp", "ie_value" : "Recovery Time Stamp", "presence" : "M", "instance" : "0", "comment" : "This IE shall contain the time stamp when the PFCP entity was started see clause 19A of 3GPPTS23.007[24]."})
msg_list[key]["ies"] = ies

View File

@ -1,4 +1,2 @@
ies = []
ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "instance" : "0", "comment" : "This IE shall indicate the acceptance or the rejection of the corresponding request message."})
ies.append({ "ie_type" : "Offending IE", "ie_value" : "Offending IE", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if the rejection is due to an conditional or mandatory IE missing or faulty."})
msg_list[key]["ies"] = ies

View File

@ -1,4 +1,4 @@
ies = []
ies.append({ "ie_type" : "Node ID", "ie_value" : "Node ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall contain the node identity of the originating node of the message."})
ies.append({ "ie_type" : "FQ-CSIDp", "ie_value" : "SGW-C FQ-CSID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included according to the requirements in clause 23 of 3GPP TS 23.007 [24]."})
ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "SGW-C FQ-CSID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included according to the requirements in clause 23 of 3GPPTS23.007[24]."})
msg_list[key]["ies"] = ies

View File

@ -1,3 +1,3 @@
ies = []
ies.append({ "ie_type" : "Recovery Time Stamp", "ie_value" : "Recovery Time Stamp", "presence" : "M", "instance" : "0", "comment" : "This IE shall contain the time stamp when the node was started see clause 19A of 3GPPTS23.007[24]."})
ies.append({ "ie_type" : "Recovery Time Stamp", "ie_value" : "Recovery Time Stamp", "presence" : "M", "instance" : "0", "comment" : "This IE shall contain the time stamp when the PFCP entity was started see clause 19A of 3GPPTS23.007[24]."})
msg_list[key]["ies"] = ies

3
lib/pfcp/support/cache/tlv-msg-3.py vendored Normal file
View File

@ -0,0 +1,3 @@
ies = []
ies.append({ "ie_type" : "PFD context", "ie_value" : "Application ID's PFDs", "presence" : "C", "instance" : "0", "comment" : "This IE shall contain an Application Identifier and the associated PFDs to be provisioned in the UP function.Several IEs with the same IE type may be present to provision PFDs for multiple Application IDs.The UP function shall delete all the PFDs received and stored earlier for all the Application IDs if this IE is absent in the message."})
msg_list[key]["ies"] = ies

4
lib/pfcp/support/cache/tlv-msg-4.py vendored Normal file
View File

@ -0,0 +1,4 @@
ies = []
ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "instance" : "0", "comment" : "This IE shall indicate the acceptance or the rejection of the corresponding request message."})
ies.append({ "ie_type" : "Offending IE", "ie_value" : "Offending IE", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if the rejection is due to an conditional or mandatory IE missing or faulty."})
msg_list[key]["ies"] = ies

View File

@ -1,7 +1,10 @@
ies = []
ies.append({ "ie_type" : "Node ID", "ie_value" : "Node ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall contain the unique identifier of the sending Node."})
ies.append({ "ie_type" : "Recovery Time Stamp", "ie_value" : "Recovery Time Stamp", "presence" : "M", "instance" : "0", "comment" : "This IE shall contain the time stamp when the node was started, see clause 19A of 3GPPTS23.007[24]."})
ies.append({ "ie_type" : "UP Function Features", "ie_value" : "UP Function Features", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function sends this message and the UP function supports at least one UP feature defined in this IE. When present, this IE shall indicate the features the UP function supports."})
ies.append({ "ie_type" : "CP Function Features", "ie_value" : "CP Function Features", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the CP function sends this message and the CP function supports at least one CP feature defined in this IE. When present, this IE shall indicate the features the CP function supports."})
ies.append({ "ie_type" : "User Plane IP Resource Information", "ie_value" : "User Plane IP Resource Information", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if the UP function sends this message.When present, this IE shall contain an IPv4 and/or an IPv6 address, together with a TEID range that the CP function shall use to allocate GTP-U F-TEID in the UP function. Several IEs with the same IE type may be present to represent multiple User Plane IP Resources."})
ies.append({ "ie_type" : "Recovery Time Stamp", "ie_value" : "Recovery Time Stamp", "presence" : "M", "instance" : "0", "comment" : "This IE shall contain the time stamp when the CP or UP function was started, see clause 19A of 3GPPTS23.007[24]. (NOTE)"})
ies.append({ "ie_type" : "UP Function Features", "ie_value" : "UP Function Features", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function sends this message and the UP function supports at least one UP feature defined in this IE.When present, this IE shall indicate the features the UP function supports."})
ies.append({ "ie_type" : "CP Function Features", "ie_value" : "CP Function Features", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the CP function sends this message and the CP function supports at least one CP feature defined in this IE.When present, this IE shall indicate the features the CP function supports."})
ies.append({ "ie_type" : "User Plane IP Resource Information", "ie_value" : "User Plane IP Resource Information", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if the UP function sends this message.When present, this IE shall contain an IPv4 and/or an IPv6 address, together with a TEID range that the CP function shall use to allocate GTP-U F-TEID in the UP function.Several IEs with the same IE type may be present to represent multiple User Plane IP Resources."})
ies.append({ "ie_type" : "UE IP Address", "ie_value" : "UE IP address Pool Identity", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if the UP function sends this message.When present, this IE shall contain an UE IP address Pool IdentitySeveral IEs with the same IE type may be present to represent multiple UE IP address Pool Identities."})
ies.append({ "ie_type" : "Alternative SMF IP Address", "ie_value" : "Alternative SMF IP Address", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if the SMF advertises the support of the SSET feature in the CP Function Features IE (see clause 8.2.58).When present, this IE shall contain an IPv4 and/or IPv6 address of an alternative SMF.Several IEs with the same IE type may be present to represent multiple alternative SMF IP addresses. "})
ies.append({ "ie_type" : "SMF Set ID", "ie_value" : "SMF Set ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the SMF advertises the support of the MPAS feature in the CP Function Features IE (see clause 5.22.3).When present, this IE shall contain an FQDN representing the SMF set to which the SMF belongs. "})
msg_list[key]["ies"] = ies

View File

@ -5,10 +5,15 @@ ies.append({ "ie_type" : "Create PDR", "ie_value" : "Create PDR", "presence" : "
ies.append({ "ie_type" : "Create PDR", "ie_value" : "Create PDR", "presence" : "M", "instance" : "1", "comment" : "This IE shall be present for at least one PDR to be associated to the PFCP session.Several IEs with the same IE type may be present to represent multiple PDRs.See Table 7.5.2.2-1."})
ies.append({ "ie_type" : "Create FAR", "ie_value" : "Create FAR", "presence" : "O", "instance" : "0", "comment" : "This IE shall be present for at least one FAR to be associated to the PFCP session.Several IEs with the same IE type may be present to represent multiple FARs.See Table 7.5.2.3-1."})
ies.append({ "ie_type" : "Create FAR", "ie_value" : "Create FAR", "presence" : "M", "instance" : "1", "comment" : "This IE shall be present for at least one FAR to be associated to the PFCP session.Several IEs with the same IE type may be present to represent multiple FARs.See Table 7.5.2.3-1."})
ies.append({ "ie_type" : "Create URR", "ie_value" : "Create URR", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a measurement action shall be applied to packets matching one or more PDR(s) of this PFCP session. Several IEs within the same IE type may be present to represent multiple URRs.See Table 7.5.2.4-1."})
ies.append({ "ie_type" : "Create QER", "ie_value" : "Create QER", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a QoS enforcement action shall be applied to packets matching one or more PDR(s) of this PFCP session.Several IEs within the same IE type may be present to represent multiple QERs.See Table 7.5.2.5-1."})
ies.append({ "ie_type" : "Create URR", "ie_value" : "Create URR", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a measurement action shall be applied to packets matching one or more PDR(s) of this PFCP session.Several IEs within the same IE type may be present to represent multiple URRs.See Table 7.5.2.4-1."})
ies.append({ "ie_type" : "Create QER", "ie_value" : "Create QER", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a QoS enforcement or QoS marking action shall be applied to packets matching one or more PDR(s) of this PFCP session.Several IEs within the same IE type may be present to represent multiple QERs.See Table 7.5.2.5-1."})
ies.append({ "ie_type" : "Create BAR", "ie_value" : "Create BAR", "presence" : "O", "instance" : "0", "comment" : "When present, this IE shall contain the buffering instructions to be applied by the UP function to any FAR of this PFCP session set with the Apply Action requesting the packets to be buffered and with a BAR ID IE referring to this BAR. See table 7.5.2.6-1."})
ies.append({ "ie_type" : "PDN Typep", "ie_value" : "PDN Type", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the PFCP session is setup for an individual PDN connection or PDU session (see subclause 5.2.1). When present, this IE shall indicate whether this is an IP or non-IP PDN connection/PDU session. "})
ies.append({ "ie_type" : "FQ-CSIDp", "ie_value" : "SGW-C FQ-CSID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included according to the requirements in clause23 of 3GPPTS 23.007[24]."})
ies.append({ "ie_type" : "User Plane Inactivity Timer", "ie_value" : "User Plane Inactivity Timer", "presence" : "O", "instance" : "0", "comment" : "This IE may be present to request the UP function to send a User Plane Inactivity Report when no user plane packets are received for this PFCP session for a duration exceeding the User Plane Inactivity Timer. When present, it shall contain the duration of the inactivity period after which a User Plane Inactivity Report shall be generated."})
ies.append({ "ie_type" : "Create Traffic Endpoint", "ie_value" : "Create Traffic Endpoint", "presence" : "C", "instance" : "0", "comment" : "This IE may be present if the UP function has indicated support of PDI optimization.Several IEs within the same IE type may be present to represent multiple Traffic Endpoints.See Table 7.5.2.7-1."})
ies.append({ "ie_type" : "PDN Type", "ie_value" : "PDN Type", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the PFCP session is setup for an individual PDN connection or PDU session (see clause 5.2.1).When present, this IE shall indicate whether this is an IP or non-IP PDN connection/PDU session or, for 5GC, an Ethernet PDU session. See NOTE 3."})
ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "SGW-C FQ-CSID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included according to the requirements in clause23 of 3GPPTS 23.007[24]."})
ies.append({ "ie_type" : "User Plane Inactivity Timer", "ie_value" : "User Plane Inactivity Timer", "presence" : "O", "instance" : "0", "comment" : "This IE may be present to request the UP function to send a User Plane Inactivity Report when no user plane packets are received for this PFCP session for a duration exceeding the User Plane Inactivity Timer.When present, it shall contain the duration of the inactivity period after which a User Plane Inactivity Report shall be generated."})
ies.append({ "ie_type" : "User ID", "ie_value" : "User ID", "presence" : "O", "instance" : "0", "comment" : "This IE may be present, based on operator policy. It shall only be sent if the UP function is in a trusted environment.See NOTE."})
ies.append({ "ie_type" : "Trace Information", "ie_value" : "Trace Information", "presence" : "O", "instance" : "0", "comment" : "When present, this IE shall contain the trace instructions to be applied by the UP function for this PFCP session."})
ies.append({ "ie_type" : "APN/DNN", "ie_value" : "APN/DNN", "presence" : "O", "instance" : "0", "comment" : "This IE may be present, if related functionalities in the UP function require the APN/DNN information. See NOTE 2."})
ies.append({ "ie_type" : "Create MAR", "ie_value" : "Create MAR", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present for a N4 session established for a MA PDU session.Several IEs with the same IE type may be present to represent multiple MARs.See Table 7.5.2.8-1."})
msg_list[key]["ies"] = ies

View File

@ -3,9 +3,10 @@ ies.append({ "ie_type" : "Node ID", "ie_value" : "Node ID", "presence" : "M", "i
ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "instance" : "0", "comment" : "This IE shall indicate the acceptance or the rejection of the corresponding request message."})
ies.append({ "ie_type" : "Offending IE", "ie_value" : "Offending IE", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if the rejection is due to a conditional or mandatory IE missing or faulty."})
ies.append({ "ie_type" : "F-SEID", "ie_value" : "UP F-SEID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the cause is set to Request accepted (success). When present, it shall contain the unique identifier allocated by the UP function identifing the session."})
ies.append({ "ie_type" : "Created PDR", "ie_value" : "Created PDR", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the cause is set to success and the UP function was requested to allocate the local F-TEID for the PDR. When present, this IE shall contain the PDR information associated to the PFCP session. There may be several instances of this IE.See table 7.5.3.2-1."})
ies.append({ "ie_type" : "Load Control Informationp", "ie_value" : "Load Control Information", "presence" : "O", "instance" : "0", "comment" : "The UP function may include this IE if it supports the load control feature and the feature is activated in the network.See Table 7.5.3.3-1."})
ies.append({ "ie_type" : "Overload Control Informationp", "ie_value" : "Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the UP function may include this IE if it supports the overload control feature and the feature is activated in the network.See Table 7.5.3.4-1."})
ies.append({ "ie_type" : "FQ-CSIDp", "ie_value" : "SGW-U FQ-CSID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included according to the requirements in clause 23 of 3GPPTS23.007[24]."})
ies.append({ "ie_type" : "Created PDR", "ie_value" : "Created PDR", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the cause is set to success and the UP function was requested to allocate a local F-TEID or a UE IP address/prefix for the PDR.When present, this IE shall contain the PDR information associated to the PFCP session. There may be several instances of this IE.See table 7.5.3.2-1."})
ies.append({ "ie_type" : "Load Control Information", "ie_value" : "Load Control Information", "presence" : "O", "instance" : "0", "comment" : "The UP function may include this IE if it supports the load control feature and the feature is activated in the network.See Table 7.5.3.3-1."})
ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the UP function may include this IE if it supports the overload control feature and the feature is activated in the network.See Table 7.5.3.4-1."})
ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "SGW-U FQ-CSID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included according to the requirements in clause 23 of 3GPPTS23.007[24]."})
ies.append({ "ie_type" : "Failed Rule ID", "ie_value" : "Failed Rule ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if the Cause IE indicates a rejection due to a rule creation or modification failure. "})
ies.append({ "ie_type" : "Created Traffic Endpoint", "ie_value" : "Created Traffic Endpoint", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the cause is set to success and the UP function was requested to allocate a local F-TEID or a UE IP address/prefix in a Create Traffic Endpoint IE. When present, it shall contain the local F-TEID or UE IP address/prefix to be used for this Traffic Endpoint.There may be several instances of this IE."})
msg_list[key]["ies"] = ies

View File

@ -1,28 +1,37 @@
ies = []
ies.append({ "ie_type" : "F-SEID", "ie_value" : "CP F-SEID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the CP function decides to change its F-SEID for the PFCP session. The UP function shall use the new CP F-SEID for subsequent PFCP Session related messages for this PFCP Session. See Note 2."})
ies.append({ "ie_type" : "Remove PDR", "ie_value" : "Remove PDR", "presence" : "C", "instance" : "0", "comment" : "When present, this IE shall contain the PDR Rule which is requested to be removed. See Table 7.5.4-8. Several IEs within the same IE type may be present to represent a list of PDRs to remove."})
ies.append({ "ie_type" : "Remove FAR", "ie_value" : "Remove FAR", "presence" : "C", "instance" : "0", "comment" : "When present, this IE shall contain the FAR Rule which is requested to be removed. See Table 7.5.4-9.Several IEs within the same IE type may be present to represent a list of FARs to remove."})
ies.append({ "ie_type" : "Remove URR", "ie_value" : "Remove URR", "presence" : "C", "instance" : "0", "comment" : "When present, this shall contain the URR Rule which is requested to be removed. See Table 7.5.4-10.Several IEs within the same IE type may be present to represent a list of URRs to remove."})
ies.append({ "ie_type" : "Remove QER", "ie_value" : "Remove QER", "presence" : "C", "instance" : "0", "comment" : "When present, this IE shall contain the QER Rule which is requested to be removed. See Table 7.5.4-11. Several IEs within the same IE type may be present to represent a list of QERs to remove."})
ies.append({ "ie_type" : "Remove PDR", "ie_value" : "Remove PDR", "presence" : "C", "instance" : "0", "comment" : "When present, this IE shall contain the PDR Rule which is requested to be removed. See Table 7.5.4-6-1.Several IEs within the same IE type may be present to represent a list of PDRs to remove."})
ies.append({ "ie_type" : "Remove FAR", "ie_value" : "Remove FAR", "presence" : "C", "instance" : "0", "comment" : "When present, this IE shall contain the FAR Rule which is requested to be removed. See Table 7.5.4-7-1.Several IEs within the same IE type may be present to represent a list of FARs to remove."})
ies.append({ "ie_type" : "Remove URR", "ie_value" : "Remove URR", "presence" : "C", "instance" : "0", "comment" : "When present, this shall contain the URR Rule which is requested to be removed. See Table 7.5.4-8-1.Several IEs within the same IE type may be present to represent a list of URRs to remove."})
ies.append({ "ie_type" : "Remove QER", "ie_value" : "Remove QER", "presence" : "C", "instance" : "0", "comment" : "When present, this IE shall contain the QER Rule which is requested to be removed. See Table 7.5.4-9-1.Several IEs within the same IE type may be present to represent a list of QERs to remove."})
ies.append({ "ie_type" : "Remove BAR", "ie_value" : "Remove BAR", "presence" : "C", "instance" : "0", "comment" : "When present, this IE shall contain the BAR Rule which is requested to be removed. See Table 7.5.4.12-1."})
ies.append({ "ie_type" : "Remove Traffic Endpoint", "ie_value" : "Remove Traffic Endpoint", "presence" : "C", "instance" : "0", "comment" : "When present, this IE shall contain the Traffic Endpoint ID identifying the traffic endpoint to be removed, if the UP function has indicated support of PDI optimization.All the PDRs that refer to the removed Traffic Endpoint shall be deleted.See Table 7.5.4.14-1."})
type_list["Create PDR"]["max_instance"] = "1"
ies.append({ "ie_type" : "Create PDR", "ie_value" : "Create PDR", "presence" : "O", "instance" : "0", "comment" : "This IE shall be present if the CP function requests the UP function to create a new PDR.See Table 7.5.2.2-1. Several IEs within the same IE type may be present to represent a list of PDRs to create."})
ies.append({ "ie_type" : "Create PDR", "ie_value" : "Create PDR", "presence" : "C", "instance" : "1", "comment" : "This IE shall be present if the CP function requests the UP function to create a new PDR.See Table 7.5.2.2-1. Several IEs within the same IE type may be present to represent a list of PDRs to create."})
ies.append({ "ie_type" : "Create PDR", "ie_value" : "Create PDR", "presence" : "O", "instance" : "0", "comment" : "This IE shall be present if the CP function requests the UP function to create a new PDR.See Table 7.5.2.2-1.Several IEs within the same IE type may be present to represent a list of PDRs to create."})
ies.append({ "ie_type" : "Create PDR", "ie_value" : "Create PDR", "presence" : "C", "instance" : "1", "comment" : "This IE shall be present if the CP function requests the UP function to create a new PDR.See Table 7.5.2.2-1.Several IEs within the same IE type may be present to represent a list of PDRs to create."})
type_list["Create FAR"]["max_instance"] = "1"
ies.append({ "ie_type" : "Create FAR", "ie_value" : "Create FAR", "presence" : "O", "instance" : "0", "comment" : "This IE shall be present if the CP function requests the UP function to create a new FAR.See Table 7.5.2.3-1.Several IEs within the same IE type may be present to represent a list of FARs to create."})
ies.append({ "ie_type" : "Create FAR", "ie_value" : "Create FAR", "presence" : "C", "instance" : "1", "comment" : "This IE shall be present if the CP function requests the UP function to create a new FAR.See Table 7.5.2.3-1.Several IEs within the same IE type may be present to represent a list of FARs to create."})
ies.append({ "ie_type" : "Create URR", "ie_value" : "Create URR", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the CP function requests the UP function to create a new URR. See Table 7.5.2.4-1. Several IEs within the same IE type may be present to represent a list of URRs to create."})
ies.append({ "ie_type" : "Create QER", "ie_value" : "Create QER", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the CP function requests the UP function to create a new QER. See Table 7.5.2.5-1. Several IEs within the same IE type may be present to represent a list of QERs to create."})
ies.append({ "ie_type" : "Create BAR", "ie_value" : "Create BAR", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the CP function requests the UP function to create a new BAR. See Table 7.5.2.2-1."})
ies.append({ "ie_type" : "Create URR", "ie_value" : "Create URR", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the CP function requests the UP function to create a new URR. See Table 7.5.2.4-1.Several IEs within the same IE type may be present to represent a list of URRs to create."})
ies.append({ "ie_type" : "Create QER", "ie_value" : "Create QER", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the CP function requests the UP function to create a new QER. See Table 7.5.2.5-1.Several IEs within the same IE type may be present to represent a list of QERs to create."})
ies.append({ "ie_type" : "Create BAR", "ie_value" : "Create BAR", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the CP function requests the UP function to create a new BAR.See Table 7.5.2.6-1."})
ies.append({ "ie_type" : "Create Traffic Endpoint", "ie_value" : "Create Traffic Endpoint", "presence" : "C", "instance" : "0", "comment" : "When present this IE shall contain the information associated with the Traffic Endpoint to be created, if the UP function has indicated support of PDI optimization. See Table 7.5.2.7-1."})
type_list["Update PDR"]["max_instance"] = "1"
ies.append({ "ie_type" : "Update PDR", "ie_value" : "Update PDR", "presence" : "O", "instance" : "0", "comment" : "This IE shall be present if a PDR previously created for the PFCP session need to be modified. See Table 7.5.4.6-1. Several IEs within the same IE type may be present to represent a list of PDRs to update."})
ies.append({ "ie_type" : "Update PDR", "ie_value" : "Update PDR", "presence" : "C", "instance" : "1", "comment" : "This IE shall be present if a PDR previously created for the PFCP session need to be modified. See Table 7.5.4.6-1. Several IEs within the same IE type may be present to represent a list of PDRs to update."})
ies.append({ "ie_type" : "Update FAR", "ie_value" : "Update FAR", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a FAR previously created for the PFCP session need to be modified. See Table 7.5.4.7-1. Several IEs within the same IE type may be present to represent a list of FARs to update."})
ies.append({ "ie_type" : "Update URR", "ie_value" : "Update URR", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if URR(s) previously created for the PFCP session need to be modified.Several IEs within the same IE type may be present to represent a list of modified URRs. Previously URRs that are not modified shall not be included. See Table 7.5.4.8-1."})
ies.append({ "ie_type" : "Update QER", "ie_value" : "Update QER", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if QER(s) previously created for the PFCP session need to be modified. Several IEs within the same IE type may be present to represent a list of modified QERs. Previously created QERs that are not modified shall not be included.See Table 7.5.4.9-1."})
ies.append({ "ie_type" : "Update BAR Session Modification Request", "ie_value" : "Update BAR", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a BAR previously created for the PFCP session needs to be modified. A previously created BAR that is not modified shall not be included.See Table 7.5.4.3-3."})
ies.append({ "ie_type" : "PFCPSMReq-Flags", "ie_value" : "PFCPSMReq-Flags", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if at least one of the flags is set to 1. - DROBU (Drop Buffered Packets): the CP function shall set this flag if the UP function is requested to drop the packets currently buffered for this PFCP session (see NOTE 1).- QAURR (Query All URRs): the CP function shall set this flag if the CP function requests immediate usage report(s) for all the URRs previously provisioned for this PFCP session (see NOTE 3). "})
ies.append({ "ie_type" : "Query URR", "ie_value" : "Query URR", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the CP function requests immediate usage report(s) to the UP function. Several IEs within the same IE type may be present to represent a list of URRs for which an immediate report is requested.See Table 7.5.4.10-1. See NOTE 3."})
ies.append({ "ie_type" : "FQ-CSIDp", "ie_value" : "PGW-C FQ-CSID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included according to the requirements in clause 23 of 3GPPTS23.007[24]."})
ies.append({ "ie_type" : "Update PDR", "ie_value" : "Update PDR", "presence" : "O", "instance" : "0", "comment" : "This IE shall be present if a PDR previously created for the PFCP session need to be modified. See Table 7.5.4.2-1.Several IEs within the same IE type may be present to represent a list of PDRs to update."})
ies.append({ "ie_type" : "Update PDR", "ie_value" : "Update PDR", "presence" : "C", "instance" : "1", "comment" : "This IE shall be present if a PDR previously created for the PFCP session need to be modified. See Table 7.5.4.2-1.Several IEs within the same IE type may be present to represent a list of PDRs to update."})
ies.append({ "ie_type" : "Update FAR", "ie_value" : "Update FAR", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a FAR previously created for the PFCP session need to be modified. See Table 7.5.4.3-1. Several IEs within the same IE type may be present to represent a list of FARs to update."})
ies.append({ "ie_type" : "Update URR", "ie_value" : "Update URR", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if URR(s) previously created for the PFCP session need to be modified.Several IEs within the same IE type may be present to represent a list of modified URRs. Previously URRs that are not modified shall not be included. See Table 7.5.4.4-1."})
ies.append({ "ie_type" : "Update QER", "ie_value" : "Update QER", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if QER(s) previously created for the PFCP session need to be modified.Several IEs within the same IE type may be present to represent a list of modified QERs.Previously created QERs that are not modified shall not be included.See Table 7.5.4.5-1."})
ies.append({ "ie_type" : "Update BAR Session Modification Request", "ie_value" : "Update BAR", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a BAR previously created for the PFCP session needs to be modified.A previously created BAR that is not modified shall not be included.See Table 7.5.4.11-1."})
ies.append({ "ie_type" : "Update Traffic Endpoint", "ie_value" : "Update Traffic Endpoint", "presence" : "C", "instance" : "0", "comment" : "When present this IE shall contain the information associated with the traffic endpoint to be updated, if the UP function has indicated support of PDI optimization.All the PDRs that refer to the Traffic Endpoint shall use the updated Traffic Endpoint information.See Table 7.5.4.13-1."})
ies.append({ "ie_type" : "PFCPSMReq-Flags", "ie_value" : "PFCPSMReq-Flags", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if at least one of the flags is set to 1.- DROBU (Drop Buffered Packets): the CP function shall set this flag if the UP function is requested to drop the packets currently buffered for this PFCP session (see NOTE 1).- QAURR (Query All URRs): the CP function shall set this flag if the CP function requests immediate usage report(s) for all the URRs previously provisioned for this PFCP session (see NOTE 3). "})
ies.append({ "ie_type" : "Query URR", "ie_value" : "Query URR", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the CP function requests immediate usage report(s) to the UP function.Several IEs within the same IE type may be present to represent a list of URRs for which an immediate report is requested.See Table 7.5.4.10-1.See NOTE 3."})
ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "PGW-C FQ-CSID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included according to the requirements in clause 23 of 3GPPTS23.007[24]."})
ies.append({ "ie_type" : "User Plane Inactivity Timer", "ie_value" : "User Plane Inactivity Timer", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if it needs to be changed."})
ies.append({ "ie_type" : "Query URR Reference", "ie_value" : "Query URR Reference", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if the Query URR IE is present or the QAURR flag is set to 1. When present, it shall contain a reference identifying the query request, which the UP function shall return in any usage report sent in response to the query."})
ies.append({ "ie_type" : "Trace Information", "ie_value" : "Trace Information", "presence" : "O", "instance" : "0", "comment" : "When present, this IE shall contain the trace instructions to be applied by the UP function for this PFCP session.A Trace Information with a null length indicates that the trace session shall be deactivated. "})
ies.append({ "ie_type" : "Remove MAR", "ie_value" : "Remove MAR", "presence" : "C", "instance" : "0", "comment" : "When present, this IE shall contain the MAR Rule which is requested to be removed. See Table 7.5.4.15-1.Several IEs within the same IE type may be present to represent a list of MARs to remove."})
ies.append({ "ie_type" : "Update MAR", "ie_value" : "Update MAR", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a MAR previously created for the PFCP session needs to be modified. See Table 7.5.4.16-1.Several IEs within the same IE type may be present to represent a list of MARs to update."})
ies.append({ "ie_type" : "Create MAR", "ie_value" : "Create MAR", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the CP function requests the UP function to create a new MAR for a new PDR. See Table 7.5.2.8-1.Several IEs within the same IE type may be present to represent a list of MARs to create."})
ies.append({ "ie_type" : "Node ID", "ie_value" : "Node ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a new SMF in an SMF Set, with one PFCP association per SMF and UPF (see clause 5.22.3), takes over the control of the PFCP session.When present, it shall contain the unique identifier of the new SMF."})
msg_list[key]["ies"] = ies

View File

@ -1,9 +1,11 @@
ies = []
ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "instance" : "0", "comment" : "This IE shall indicate the acceptance or the rejection of the corresponding request message."})
ies.append({ "ie_type" : "Offending IE", "ie_value" : "Offending IE", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if the rejection is due to an conditional or mandatory IE missing or faulty."})
ies.append({ "ie_type" : "Created PDR", "ie_value" : "Created PDR", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the cause is set to success, new PDR(s) were requested to be created and the UP function was requested to allocate the local F-TEID for the PDR(s).When present, this IE shall contain the PDR information associated to the PFCP session. See Table 7.5.3-2."})
ies.append({ "ie_type" : "Load Control Informationp", "ie_value" : "Load Control Information", "presence" : "O", "instance" : "0", "comment" : "The UP function may include this IE if it supports the load control feature and the feature is activated in the network.See Table 7.5.3-3."})
ies.append({ "ie_type" : "Overload Control Informationp", "ie_value" : "Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the UP function may include this IE if it supports the overload control feature and the feature is activated in the network."})
ies.append({ "ie_type" : "Usage Report in Session Modification Response", "ie_value" : "Usage Report", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Query URR IE was present in the PFCP Session Modification Request and traffic usage measurements for that URR are available at the UP function. Several IEs within the same IE type may be present to represent a list of Usage Reports."})
ies.append({ "ie_type" : "Offending IE", "ie_value" : "Offending IE", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if the rejection is due to a conditional or mandatory IE missing or faulty."})
ies.append({ "ie_type" : "Created PDR", "ie_value" : "Created PDR", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the cause is set to success, new PDR(s) were requested to be created and the UP function was requested to allocate the local F-TEID for the PDR(s).When present, this IE shall contain the PDR information associated to the PFCP session.See Table 7.5.3.2-1."})
ies.append({ "ie_type" : "Load Control Information", "ie_value" : "Load Control Information", "presence" : "O", "instance" : "0", "comment" : "The UP function may include this IE if it supports the load control feature and the feature is activated in the network.See Table 7.5.3.3-1."})
ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the UP function may include this IE if it supports the overload control feature and the feature is activated in the network."})
ies.append({ "ie_type" : "Usage Report Session Modification Response", "ie_value" : "Usage Report", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if: - the Query URR IE was present or the QAURR flag was set to 1 in the PFCP Session Modification Request, - traffic usage measurements for that URR are available at the UP function, and - the UP function decides to return some or all of the requested usage reports in the PFCP Session Modification Response.This IE shall be also present if: - a URR or the last PDR associated to a URR has been removed, - non-null traffic usage measurements for that URR are available in the UP function, and - the UP function decides to return some or all of the related usage reports in the PFCP Session Modification Response (see clause 5.2.2.3.1).Several IEs within the same IE type may be present to represent a list of Usage Reports."})
ies.append({ "ie_type" : "Failed Rule ID", "ie_value" : "Failed Rule ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if the Cause IE indicates a rejection due to a rule creation or modification failure."})
ies.append({ "ie_type" : "Additional Usage Reports Information", "ie_value" : "Additional Usage Reports Information", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if the Query URR IE was present or the QAURR flag was set to 1 in the PFCP Session Modification Request, and usage reports need to be sent in additional PFCP Session Report Request messages (see clause 5.2.2.3.1).When present, this IE shall either indicate that additional usage reports will follow, or indicate the total number of usage reports that need to be sent in PFCP Session Report Request messages. "})
ies.append({ "ie_type" : "Created Traffic Endpoint", "ie_value" : "Created/Updated Traffic Endpoint", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the cause is set to success, Traffic Endpoint(s) were requested to be created or updated, and the UP function was requested to allocate the local F-TEID for the Traffic Endpoint(s).When present, this IE shall contain the Traffic Endpoint information associated to the PFCP session.See Table 7.5.3.5-1."})
msg_list[key]["ies"] = ies

View File

@ -1 +1,7 @@
ies = []
ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "instance" : "0", "comment" : "This IE shall indicate the acceptance or the rejection of the corresponding request message."})
ies.append({ "ie_type" : "Offending IE", "ie_value" : "Offending IE", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if the rejection is due to an conditional or mandatory IE missing or faulty."})
ies.append({ "ie_type" : "Load Control Information", "ie_value" : "Load Control Information", "presence" : "O", "instance" : "0", "comment" : "The UP function may include this IE if it supports the load control feature and the feature is activated in the network.See Table 7.5.3.3-1."})
ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the UP function may include this IE if it supports the overload control feature and the feature is activated in the network.See Table 7.5.3.4-1."})
ies.append({ "ie_type" : "Usage Report Session Deletion Response", "ie_value" : "Usage Report", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a URR had been provisioned in the UP function for the PFCP session being deleted and traffic usage measurements for that URR are available at the UP function.Several IEs within the same IE type may be present to represent a list of Usage Reports."})
msg_list[key]["ies"] = ies

View File

@ -1,8 +1,11 @@
ies = []
ies.append({ "ie_type" : "Report Type", "ie_value" : "Report Type", "presence" : "M", "instance" : "0", "comment" : "This IE shall indicate the type of the report."})
ies.append({ "ie_type" : "Downlink Data Report", "ie_value" : "Downlink Data Report", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Report Type indicates a Downlink Data Report. "})
ies.append({ "ie_type" : "Usage Report Session Report Request", "ie_value" : "Usage Report", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Report Type indicates a Usage Report. Several IEs within the same IE type may be present to represent a list of Usage Reports."})
ies.append({ "ie_type" : "Usage Report Session Report Request", "ie_value" : "Usage Report", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Report Type indicates a Usage Report.Several IEs within the same IE type may be present to represent a list of Usage Reports."})
ies.append({ "ie_type" : "Error Indication Report", "ie_value" : "Error Indication Report", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the Report Type indicates an Error Indication Report. "})
ies.append({ "ie_type" : "Load Control Informationp", "ie_value" : "Load Control Information", "presence" : "O", "instance" : "0", "comment" : "The UP function may include this IE if it supports the load control feature and the feature is activated in the network.See Table 7.5.3.3-1."})
ies.append({ "ie_type" : "Overload Control Informationp", "ie_value" : "Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the UP function may include this IE if it supports the overload control feature and the feature is activated in the network.See Table 7.5.3.4-1."})
ies.append({ "ie_type" : "Load Control Information", "ie_value" : "Load Control Information", "presence" : "O", "instance" : "0", "comment" : "The UP function may include this IE if it supports the load control feature and the feature is activated in the network.See Table 7.5.3.3-1."})
ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the UP function may include this IE if it supports the overload control feature and the feature is activated in the network.See Table 7.5.3.4-1."})
ies.append({ "ie_type" : "Additional Usage Reports Information", "ie_value" : "Additional Usage Reports Information", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included in one additional PFCP Session Report Request message, if the PFCP Session Modification Response indicated that more reports would follow (i.e. if the AURI flag was set to 1) (see clause 5.2.2.3.1).When present, this IE shall indicate the total number of usage reports that need to be sent in PFCP Session Report Request messages. "})
ies.append({ "ie_type" : "PFCPSRReq-Flags", "ie_value" : "PFCPSRReq-Flags", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if at least one of the flags is set to 1.- PSDBU (PFCP Session Deleted By the UP function): if both the CP function and UP function support the EPFAR feature, the UP function may set this flag if the UP function needs to delete the PFCP session, e.g. to report all remaining non-zero usage reports for all URRs in the PFCP Session and the PFCP session is being deleted locally in the UP function."})
ies.append({ "ie_type" : "F-SEID", "ie_value" : "Old CP F-SEID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UPF sends the PFCP Session Report Request to a different SMF in an SMF Set. See clauses 5.22.2 and 5.22.3.When present, it shall indicate the CP F-SEID assigned by the previous SMF to the PFCP session. "})
msg_list[key]["ies"] = ies

View File

@ -1,6 +1,9 @@
ies = []
ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "instance" : "0", "comment" : "This IE shall indicate the acceptance or the rejection of the corresponding request message."})
ies.append({ "ie_type" : "Offending IE", "ie_value" : "Offending IE", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if the rejection is due to an conditional or mandatory IE missing or faulty."})
ies.append({ "ie_type" : "Update BAR PFCP Session Report Response", "ie_value" : "Update BAR", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a BAR previously created for the PFCP session needs to be modified. A previously created BAR that is not modified shall not be included. See Table 7.5.9.2-1."})
ies.append({ "ie_type" : "PFCPSRRsp-Flags", "ie_value" : "PFCPSRRsp-Flags", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if at least one of the flags is set to 1."})
ies.append({ "ie_type" : "Offending IE", "ie_value" : "Offending IE", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if the rejection is due to a conditional or mandatory IE missing or faulty."})
ies.append({ "ie_type" : "Update BAR PFCP Session Report Response", "ie_value" : "Update BAR", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a BAR previously created for the PFCP session needs to be modified.A previously created BAR that is not modified shall not be included.See Table 7.5.9.2-1."})
ies.append({ "ie_type" : "PFCPSRRsp-Flags", "ie_value" : "PFCPSRRsp-Flags", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if at least one of the flags is set to 1.- DROBU (Drop Buffered Packets): the CP function shall set this flag if the UP function needs to drop the packets currently buffered for this PFCP session (see NOTE 1)."})
ies.append({ "ie_type" : "F-SEID", "ie_value" : "CP F-SEID", "presence" : "O", "instance" : "0", "comment" : "This IE may be set by the SMF if the UPF indicated support of PFCP sessions successively controlled by different SMFs of a same SMF Set and the Cause IE indicates Request accepted (success)(see clause 5.22).When present, it shall be set to the new F-SEID that the UPF shall use for sending subsequent PFCP session related messages."})
ies.append({ "ie_type" : "F-TEID", "ie_value" : "N4-u F-TEID", "presence" : "O", "instance" : "0", "comment" : "This IE may be set by the SMF if the UPF indicated support of PFCP sessions successively controlled by different SMFs of a same SMF Set and the Cause IE indicates Request accepted (success).When present, it shall be set to the new N4-u F-TEID that the UPF shall use for data forwarding towards the SMF. "})
ies.append({ "ie_type" : "Alternative SMF IP Address", "ie_value" : "Alternative SMF IP Address", "presence" : "O", "instance" : "0", "comment" : "This IE may be set by the SMF if the UPF indicated support of PFCP sessions successively controlled by different SMFs of a same SMF Set and the Cause IE indicates Redirection Requested (see clause 5.22).When present, it shall be set to the IP address of the new SMF to contact. "})
msg_list[key]["ies"] = ies

View File

@ -1,8 +1,9 @@
ies = []
ies.append({ "ie_type" : "Node ID", "ie_value" : "Node ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall contain the unique identifier of the sending Node."})
ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "instance" : "0", "comment" : "This IE shall indicate the acceptance or the rejection of the corresponding request message."})
ies.append({ "ie_type" : "Recovery Time Stamp", "ie_value" : "Recovery Time Stamp", "presence" : "M", "instance" : "0", "comment" : "This IE shall contain the time stamp when the node was started, see clause 19A of 3GPPTS23.007[24]."})
ies.append({ "ie_type" : "UP Function Features", "ie_value" : "UP Function Features", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function sends this message and the UP function supports at least one UP feature defined in this IE. When present, this IE shall indicate the features the UP function supports."})
ies.append({ "ie_type" : "CP Function Features", "ie_value" : "CP Function Features", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the CP function sends this message and the CP function supports at least one CP feature defined in this IE. When present, this IE indicates the features the CP function supports."})
ies.append({ "ie_type" : "User Plane IP Resource Information", "ie_value" : "User Plane IP Resource Information", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if the UP function sends this message.When present, this IE shall contain an IPv4 and/or an IPv6 address, together with a TEID range that the CP function shall use to allocate GTP-U F-TEID in the UP function. Several IEs with the same IE type may be present to represent multiple User Plane IP Resources."})
ies.append({ "ie_type" : "Recovery Time Stamp", "ie_value" : "Recovery Time Stamp", "presence" : "M", "instance" : "0", "comment" : "This IE shall contain the time stamp when the CP or UP function was started, see clause 19A of 3GPPTS23.007[24]. (NOTE)"})
ies.append({ "ie_type" : "UP Function Features", "ie_value" : "UP Function Features", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function sends this message and the UP function supports at least one UP feature defined in this IE.When present, this IE shall indicate the features the UP function supports."})
ies.append({ "ie_type" : "CP Function Features", "ie_value" : "CP Function Features", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the CP function sends this message and the CP function supports at least one CP feature defined in this IE.When present, this IE indicates the features the CP function supports."})
ies.append({ "ie_type" : "User Plane IP Resource Information", "ie_value" : "User Plane IP Resource Information", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if the UP function sends this message.When present, this IE shall contain an IPv4 and/or an IPv6 address, together with a TEID range that the CP function shall use to allocate GTP-U F-TEID in the UP function.Several IEs with the same IE type may be present to represent multiple User Plane IP Resources."})
ies.append({ "ie_type" : "Alternative SMF IP Address", "ie_value" : "Alternative SMF IP Address", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if the SMF advertises the support of the SSET feature in the CP Function Features IE (see clause 8.2.58).When present, this IE shall contain an IPv4 and/or IPv6 address of an alternative SMF.Several IEs with the same IE type may be present to represent multiple alternative SMF IP addresses. "})
msg_list[key]["ies"] = ies

View File

@ -5,4 +5,6 @@ ies.append({ "ie_type" : "CP Function Features", "ie_value" : "CP Function Featu
ies.append({ "ie_type" : "PFCP Association Release Request", "ie_value" : "PFCP Association Release Request", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function requests the CP function to release the PFCP association."})
ies.append({ "ie_type" : "Graceful Release Period", "ie_value" : "Graceful Release Period", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the UP function requests a graceful release of the PFCP association."})
ies.append({ "ie_type" : "User Plane IP Resource Information", "ie_value" : "User Plane IP Resource Information", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if the UP function sends this message.When present, this IE shall contain an IPv4 and/or an IPv6 address, together with a TEID range that the CP function shall use to allocate GTP-U F-TEID in the UP function.Several IEs with the same IE type may be present to represent multiple User Plane IP Resources. "})
ies.append({ "ie_type" : "PFCPAUReq-Flags", "ie_value" : "PFCPAUReq-Flags", "presence" : "O", "instance" : "0", "comment" : "This IE shall be included if at least one of the flags is set to 1.- PARPS (PFCP Association Release Preparation Start): if both the CP function and UP function support the EPFAR feature, the CP or UP function may set this flag to 1 to indicate that the PFCP association is to be released and all non-zero usage reports for those PFCP Sessions affected by the release of the PFCP association shall be reported."})
ies.append({ "ie_type" : "Alternative SMF IP Address", "ie_value" : "Alternative SMF IP Address", "presence" : "O", "instance" : "0", "comment" : "This IE may be present if the SMF advertises the support of the SSET feature in the CP Function Features IE (see clause 8.2.58).When present, this IE shall contain an IPv4 and/or IPv6 address of an alternative SMF.Several IEs with the same IE type may be present to represent multiple alternative SMF IP addresses. "})
msg_list[key]["ies"] = ies

View File

@ -48,12 +48,12 @@ type_list["DL Buffering Duration"] = { "type" : "47", "max_instance" : "0" }
type_list["DL Buffering Suggested Packet Count"] = { "type" : "48", "max_instance" : "0" }
type_list["PFCPSMReq-Flags"] = { "type" : "49", "max_instance" : "0" }
type_list["PFCPSRRsp-Flags"] = { "type" : "50", "max_instance" : "0" }
type_list["Load Control Informationp"] = { "type" : "51", "max_instance" : "0" }
type_list["Load Control Information"] = { "type" : "51", "max_instance" : "0" }
type_list["Sequence Number"] = { "type" : "52", "max_instance" : "0" }
type_list["Metricp"] = { "type" : "53", "max_instance" : "0" }
type_list["Overload Control Informationp"] = { "type" : "54", "max_instance" : "0" }
type_list["Metric"] = { "type" : "53", "max_instance" : "0" }
type_list["Overload Control Information"] = { "type" : "54", "max_instance" : "0" }
type_list["Timer"] = { "type" : "55", "max_instance" : "0" }
type_list["Packet Detection Rule ID"] = { "type" : "56", "max_instance" : "0" }
type_list["PDR ID"] = { "type" : "56", "max_instance" : "0" }
type_list["F-SEID"] = { "type" : "57", "max_instance" : "0" }
type_list["Application ID's PFDs"] = { "type" : "58", "max_instance" : "0" }
type_list["PFD context"] = { "type" : "59", "max_instance" : "0" }
@ -62,7 +62,7 @@ type_list["PFD contents"] = { "type" : "61", "max_instance" : "0" }
type_list["Measurement Method"] = { "type" : "62", "max_instance" : "0" }
type_list["Usage Report Trigger"] = { "type" : "63", "max_instance" : "0" }
type_list["Measurement Period"] = { "type" : "64", "max_instance" : "0" }
type_list["FQ-CSIDp"] = { "type" : "65", "max_instance" : "0" }
type_list["FQ-CSID"] = { "type" : "65", "max_instance" : "0" }
type_list["Volume Measurement"] = { "type" : "66", "max_instance" : "0" }
type_list["Duration Measurement"] = { "type" : "67", "max_instance" : "0" }
type_list["Application Detection Information"] = { "type" : "68", "max_instance" : "0" }
@ -75,7 +75,7 @@ type_list["Time Quota"] = { "type" : "74", "max_instance" : "0" }
type_list["Start Time"] = { "type" : "75", "max_instance" : "0" }
type_list["End Time"] = { "type" : "76", "max_instance" : "0" }
type_list["Query URR"] = { "type" : "77", "max_instance" : "0" }
type_list["Usage Report in Session Modification Response"] = { "type" : "78", "max_instance" : "0" }
type_list["Usage Report Session Modification Response"] = { "type" : "78", "max_instance" : "0" }
type_list["Usage Report Session Deletion Response"] = { "type" : "79", "max_instance" : "0" }
type_list["Usage Report Session Report Request"] = { "type" : "80", "max_instance" : "0" }
type_list["URR ID"] = { "type" : "81", "max_instance" : "0" }
@ -110,7 +110,7 @@ type_list["QER ID"] = { "type" : "109", "max_instance" : "0" }
type_list["OCI Flags"] = { "type" : "110", "max_instance" : "0" }
type_list["PFCP Association Release Request"] = { "type" : "111", "max_instance" : "0" }
type_list["Graceful Release Period"] = { "type" : "112", "max_instance" : "0" }
type_list["PDN Typep"] = { "type" : "113", "max_instance" : "0" }
type_list["PDN Type"] = { "type" : "113", "max_instance" : "0" }
type_list["Failed Rule ID"] = { "type" : "114", "max_instance" : "0" }
type_list["Time Quota Mechanism"] = { "type" : "115", "max_instance" : "0" }
type_list["User Plane IP Resource Information"] = { "type" : "116", "max_instance" : "0" }
@ -122,3 +122,60 @@ type_list["Subsequent Volume Quota"] = { "type" : "121", "max_instance" : "0" }
type_list["Subsequent Time Quota"] = { "type" : "122", "max_instance" : "0" }
type_list["RQI"] = { "type" : "123", "max_instance" : "0" }
type_list["QFI"] = { "type" : "124", "max_instance" : "0" }
type_list["Query URR Reference"] = { "type" : "125", "max_instance" : "0" }
type_list["Additional Usage Reports Information"] = { "type" : "126", "max_instance" : "0" }
type_list["Create Traffic Endpoint"] = { "type" : "127", "max_instance" : "0" }
type_list["Created Traffic Endpoint"] = { "type" : "128", "max_instance" : "0" }
type_list["Update Traffic Endpoint"] = { "type" : "129", "max_instance" : "0" }
type_list["Remove Traffic Endpoint"] = { "type" : "130", "max_instance" : "0" }
type_list["Traffic Endpoint ID"] = { "type" : "131", "max_instance" : "0" }
type_list["Ethernet Packet Filter"] = { "type" : "132", "max_instance" : "0" }
type_list["MAC address"] = { "type" : "133", "max_instance" : "0" }
type_list["C-TAG"] = { "type" : "134", "max_instance" : "0" }
type_list["S-TAG"] = { "type" : "135", "max_instance" : "0" }
type_list["Ethertype"] = { "type" : "136", "max_instance" : "0" }
type_list["Proxying"] = { "type" : "137", "max_instance" : "0" }
type_list["Ethernet Filter ID"] = { "type" : "138", "max_instance" : "0" }
type_list["Ethernet Filter Properties"] = { "type" : "139", "max_instance" : "0" }
type_list["Suggested Buffering Packets Count"] = { "type" : "140", "max_instance" : "0" }
type_list["User ID"] = { "type" : "141", "max_instance" : "0" }
type_list["Ethernet PDU Session Information"] = { "type" : "142", "max_instance" : "0" }
type_list["Ethernet Traffic Information"] = { "type" : "143", "max_instance" : "0" }
type_list["MAC Addresses Detected"] = { "type" : "144", "max_instance" : "0" }
type_list["MAC Addresses Removed"] = { "type" : "145", "max_instance" : "0" }
type_list["Ethernet Inactivity Timer"] = { "type" : "146", "max_instance" : "0" }
type_list["Additional Monitoring Time"] = { "type" : "147", "max_instance" : "0" }
type_list["Event Quota"] = { "type" : "148", "max_instance" : "0" }
type_list["Event Threshold"] = { "type" : "149", "max_instance" : "0" }
type_list["Subsequent Event Quota"] = { "type" : "150", "max_instance" : "0" }
type_list["Subsequent Event Threshold"] = { "type" : "151", "max_instance" : "0" }
type_list["Trace Information"] = { "type" : "152", "max_instance" : "0" }
type_list["Framed-Route"] = { "type" : "153", "max_instance" : "0" }
type_list["Framed-Routing"] = { "type" : "154", "max_instance" : "0" }
type_list["Framed-IPv6-Route"] = { "type" : "155", "max_instance" : "0" }
type_list["Event Time Stamp"] = { "type" : "156", "max_instance" : "0" }
type_list["Averaging Window"] = { "type" : "157", "max_instance" : "0" }
type_list["Paging Policy Indicator"] = { "type" : "158", "max_instance" : "0" }
type_list["APN/DNN"] = { "type" : "159", "max_instance" : "0" }
type_list["3GPP Interface Type"] = { "type" : "160", "max_instance" : "0" }
type_list["PFCPSRReq-Flags"] = { "type" : "161", "max_instance" : "0" }
type_list["PFCPAUReq-Flags"] = { "type" : "162", "max_instance" : "0" }
type_list["Activation Time"] = { "type" : "163", "max_instance" : "0" }
type_list["Deactivation Time"] = { "type" : "164", "max_instance" : "0" }
type_list["Create MAR"] = { "type" : "165", "max_instance" : "0" }
type_list["Access Forwarding Action Information 1"] = { "type" : "166", "max_instance" : "0" }
type_list["Access Forwarding Action Information 2"] = { "type" : "167", "max_instance" : "0" }
type_list["Remove MAR"] = { "type" : "168", "max_instance" : "0" }
type_list["Update MAR"] = { "type" : "169", "max_instance" : "0" }
type_list["MAR ID"] = { "type" : "170", "max_instance" : "0" }
type_list["Steering Functionality"] = { "type" : "171", "max_instance" : "0" }
type_list["Steering Mode"] = { "type" : "172", "max_instance" : "0" }
type_list["Weight"] = { "type" : "173", "max_instance" : "0" }
type_list["Priority"] = { "type" : "174", "max_instance" : "0" }
type_list["Update Access Forwarding Action Information 1"] = { "type" : "175", "max_instance" : "0" }
type_list["Update Access Forwarding Action Information 2"] = { "type" : "176", "max_instance" : "0" }
type_list["UE IP address Pool Identity"] = { "type" : "177", "max_instance" : "0" }
type_list["Alternative SMF IP Address"] = { "type" : "178", "max_instance" : "0" }
type_list["Packet Replication and Detection Carry-On Information"] = { "type" : "179", "max_instance" : "0" }
type_list["SMF Set ID"] = { "type" : "180", "max_instance" : "0" }
type_list["Quota Validity Time"] = { "type" : "181", "max_instance" : "0" }

View File

@ -113,31 +113,24 @@ def get_cells(cells):
if comment.find('Report Type') != -1:
ie_type = "Usage Report Session Report Request"
elif comment.find('Query URR') != -1:
ie_type = "Usage Report in Session Modification Response"
ie_type = "Usage Report Session Modification Response"
elif comment.find('provisioned ') != -1:
ie_type = "Usage Report Session Deletion Response"
else:
assert False, "Unknown IE type : [Usage Report]"
if ie_type == 'Update BAR':
if comment.find('7.5.4.3-3') != -1:
if comment.find('7.5.4.11-1') != -1:
ie_type = "Update BAR Session Modification Request"
elif comment.find('7.5.9.2-1') != -1:
ie_type = "Update BAR PFCP Session Report Response"
else:
assert False, "Unknown IE type : [Update BAR]"
if ie_type == 'Metric' or ie_type == 'FQ-CSID' or ie_type == 'PDN Type':
ie_type = ie_type + 'p'
elif ie_type == 'Load Control Information' or ie_type == 'Overload Control Information':
ie_type = ie_type + 'p'
if ie_type.find('PFD Contents') != -1:
ie_type = 'PFD contents'
elif ie_type.find('PFD') != -1:
ie_type = 'PFD context'
elif ie_type.find('PDR ID') != -1:
ie_type = 'Packet Detection Rule ID'
elif ie_type.find('UE IP address') != -1:
ie_type = 'UE IP Address'
elif ie_type.find('SxSMReq-Flags') != -1:
@ -154,16 +147,12 @@ def get_cells(cells):
if ie_value[len(ie_value)-1] == ' ':
ie_value = ie_value[:len(ie_value)-1]
# 0402: ?
#print ie_type
if ie_type == 'Create PDR' or ie_type == 'Create FAR' or ie_type == 'Update PDR':
instance = "1"
print ie_type + ' ' + type_list[ie_type]["max_instance"] + '\n'
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")
print "CCCCCCCCCCCCCCCCCCCCCCCCCCCC\n"
return { "ie_type" : ie_type, "ie_value" : ie_value, "presence" : presence, "instance" : instance, "comment" : comment }
@ -214,26 +203,24 @@ else:
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)
#print("Table Index = %d\n" % i)
try:
cell = table.rows[0].cells[0]
except:
continue;
else:
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]:
for row in msg_table.rows[2:-3]:
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 }
#print("msg type =" + type)
write_file(f, "msg_list[\"" + key + "\"] = { \"type\" : \"" + type + "\" }\n")
f.close()
@ -248,48 +235,28 @@ else:
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)
try:
cell = table.rows[0].cells[0]
except:
pass
else:
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:-1]:
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('\)', '', key)
key = re.sub('\s*$', '', key)
key = re.sub('\(', '', key)
key = re.sub('\)', '', key)
key = re.sub('\s*$', '', key)
type = row.cells[0].text.encode('ascii', 'ignore')
if key == 'Metric' or key == 'FQ-CSID' or key == 'PDN Type':
key = key + 'p'
elif key == 'Load Control Information' or key == 'Overload Control Information':
key = key + 'p'
# 0402: here is active !
#if key == 'Create PDR' or key == 'Create FAR' or key == 'Update PDR':
# type_list[key] = { "type": type , "max_instance" : "1" }
#else:
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'
@ -301,102 +268,98 @@ else:
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[1].text.find('Outer Header to be created') == -1 and \
table.rows[0].cells[2].text.find('IE Type') != -1:
d_print("Table Index = %d\n" % i)
try:
cell = table.rows[0].cells[0]
except:
pass
else:
if cell.text.find('Octet') != -1 and \
table.rows[0].cells[1].text.find('Outer Header to be created') == -1:
row = table.rows[0];
num = 0;
if len(table.rows[0].cells) > 2 and table.rows[0].cells[2].text.find('IE Type') != -1:
num = 2
elif len(table.rows[0].cells) > 3 and table.rows[0].cells[3].text.find('IE Type') != -1:
num = 3
elif len(table.rows[0].cells) > 4 and table.rows[0].cells[4].text.find('IE Type') != -1:
num = 4
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 num == 0:
continue;
if (int(ie_type) == 78):
ie_name = "Usage Report in Session Modification Response"
elif (int(ie_type) == 79):
ie_name = "Usage Report Session Deletion Response"
elif (int(ie_type) == 80):
ie_name = "Usage Report Session Report Request"
elif (int(ie_type) == 86):
ie_name = "Update BAR Session Modification Request"
elif (int(ie_type) == 12):
ie_name = "Update BAR PFCP Session Report Response"
if ie_name == 'PFD':
ie_name = 'PFD context'
if ie_name == 'Load Control Information' or ie_name == 'Overload Control Information':
ie_name = ie_name + 'p'
row = table.rows[0];
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
#if cells["ie_type"] == 'Create PDR' or cells["ie_type"] == 'Create FAR' or cells["ie_type"] == 'Update PDR':
# cells["instance"] = str(int(cells["instance"])+1)
# print 'Hahahaha-----------------------\n'
d_print("Table Index = %d[%s]\n" % (i, row.cells[num].text))
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)
if len(re.findall('\d+', row.cells[num].text)) == 0:
continue;
ie_type = re.findall('\d+', row.cells[num].text)[-1].encode('ascii', 'ignore')
ie_name = re.sub('\s*IE Type.*', '', row.cells[num].text.encode('ascii', 'ignore'))
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
d_print("TYPE:%s NAME:%s\n" % (ie_type, ie_name))
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")
# SKIP Access Forwarding Action Information
if (int(ie_type) == 78):
ie_name = "Usage Report Session Modification Response"
elif (int(ie_type) == 79):
ie_name = "Usage Report Session Deletion Response"
elif (int(ie_type) == 80):
ie_name = "Usage Report Session Report Request"
elif (int(ie_type) == 86):
ie_name = "Update BAR Session Modification Request"
elif (int(ie_type) == 12):
ie_name = "Update BAR PFCP Session Report Response"
if ie_name.find('Access Forwarding Action Information 2') != -1:
ie_idx = str(int(ie_type)+100)
write_file(f, "ies = []\n")
write_file(f, "group_list[\"" + ie_name + "\"] = { \"index\" : \"" + ie_idx + "\", \"type\" : \"" + ie_type + "\", \"ies\" : ies }\n")
continue
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)
ie_idx = str(int(ie_type)+100)
group_list[ie_name] = { "index" : ie_idx, "type" : ie_type, "ies" : ies }
write_file(f, "group_list[\"" + ie_name + "\"] = { \"index\" : \"" + ie_idx + "\", \"type\" : \"" + ie_type + "\", \"ies\" : ies }\n")
f.close()
msg_list["PFCP Heartbeat Request"]["table"] = 6
msg_list["PFCP Heartbeat Response"]["table"] = 7
msg_list["PFCP Association Setup Request"]["table"] = 12
msg_list["PFCP Association Setup Response"]["table"] = 13
msg_list["PFCP Association Update Request"]["table"] = 14
msg_list["PFCP Association Update Response"]["table"] = 15
msg_list["PFCP Association Release Request"]["table"] = 16
msg_list["PFCP Association Release Response"]["table"] = 17
msg_list["PFCP Version Not Supported Response"]["table"] = 11
msg_list["PFCP Node Report Request"]["table"] = 18
msg_list["PFCP Node Report Response"]["table"] = 20
msg_list["PFCP Session Set Deletion Request"]["table"] = 21
msg_list["PFCP Session Set Deletion Response"]["table"] = 22
msg_list["PFCP Session Establishment Request"]["table"] = 23
msg_list["PFCP Session Establishment Response"]["table"] = 33
msg_list["PFCP Session Modification Request"]["table"] = 37
msg_list["PFCP Session Modification Response"]["table"] = 51
msg_list["PFCP Session Deletion Request"]["table"] = 53
msg_list["PFCP Session Deletion Response"]["table"] = 54
msg_list["PFCP Session Report Request"]["table"] = 56
msg_list["PFCP Session Report Response"]["table"] = 57
msg_list["PFCP Heartbeat Request"]["table"] = 7
msg_list["PFCP Heartbeat Response"]["table"] = 8
msg_list["PFCP PFD Management Request"]["table"] = 9
msg_list["PFCP PFD Management Response"]["table"] = 12
msg_list["PFCP Association Setup Request"]["table"] = 13
msg_list["PFCP Association Setup Response"]["table"] = 14
msg_list["PFCP Association Update Request"]["table"] = 15
msg_list["PFCP Association Update Response"]["table"] = 16
msg_list["PFCP Association Release Request"]["table"] = 17
msg_list["PFCP Association Release Response"]["table"] = 18
msg_list["PFCP Version Not Supported Response"]["table"] = 0
msg_list["PFCP Node Report Request"]["table"] = 19
msg_list["PFCP Node Report Response"]["table"] = 21
msg_list["PFCP Session Set Deletion Request"]["table"] = 22
msg_list["PFCP Session Set Deletion Response"]["table"] = 23
msg_list["PFCP Session Establishment Request"]["table"] = 24
msg_list["PFCP Session Establishment Response"]["table"] = 40
msg_list["PFCP Session Modification Request"]["table"] = 45
msg_list["PFCP Session Modification Response"]["table"] = 65
msg_list["PFCP Session Deletion Request"]["table"] = 67
msg_list["PFCP Session Deletion Response"]["table"] = 68
msg_list["PFCP Session Report Request"]["table"] = 70
msg_list["PFCP Session Report Response"]["table"] = 76
for key in msg_list.keys():
if "table" in msg_list[key].keys():
@ -419,36 +382,26 @@ for key in msg_list.keys():
else:
start_i = 2
if key != "PFCP Session Deletion Request": # this msg is null
if key != "PFCP Session Deletion Request" and key != "PFCP Version Not Supported Response":
for row in table.rows[start_i:]:
cells = get_cells(row.cells)
if cells is None:
continue
# 0402
if (cells["ie_type"] == 'Create PDR' or cells["ie_type"] == 'Create FAR' or cells["ie_type"] == 'Update PDR'):
cells["instance"] = '0'
cells["presence"] = 'O'
ies.append(cells)
write_cells_to_file("ies", cells)
cells = get_cells(row.cells)
ies_is_added = True
for ie in ies:
#0403 modify
if (cells["ie_type"], cells["instance"]) == (ie["ie_type"], ie["instance"]):
#if (cells["ie_type"], cells["ie_value"]) == (ie["ie_type"], ie["ie_value"]):
ies_is_added = False
if ies_is_added is True:
ies.append(cells)
write_cells_to_file("ies", cells)
# 0402
#if (cells["ie_type"] == 'Create PDR' or cells["ie_type"] == 'Create FAR' or cells["ie_type"] == 'Update PDR'):
# cells["instance"] = str(int(cells["instance"])+1)
# cells["ie_value"] = cells["ie_value"] + '1'
# cells["presence"] ='O'
# 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()
@ -530,7 +483,41 @@ for (k, v) in sorted_type_list:
f.write("_" + str(instance) + ";\n")
f.write("\n")
tmp = [(k, v["type"]) for k, v in group_list.items()]
for k, v in group_list.items():
if v_lower(k) == "ethernet_packet_filter":
v["index"] = "1"
if v_lower(k) == "pdi":
v["index"] = "2"
if v_lower(k) == "create_pdr":
v["index"] = "3"
if v_lower(k) == "forwarding_parameters":
v["index"] = "4"
if v_lower(k) == "duplicating_parameters":
v["index"] = "5"
if v_lower(k) == "create_far":
v["index"] = "6"
if v_lower(k) == "update_forwarding_parameters":
v["index"] = "7"
if v_lower(k) == "update_duplicating_parameters":
v["index"] = "8"
if v_lower(k) == "update_far":
v["index"] = "9"
if v_lower(k) == "pfd_context":
v["index"] = "10"
if v_lower(k) == "application_id_s_pfds":
v["index"] = "11"
if v_lower(k) == "ethernet_traffic_information":
v["index"] = "12"
if v_lower(k) == "access_forwarding_action_information_1":
v["index"] = "13"
if v_lower(k) == "access_forwarding_action_information_2":
v["index"] = "14"
if v_lower(k) == "update_access_forwarding_action_information_1":
v["index"] = "15"
if v_lower(k) == "update_access_forwarding_action_information_2":
v["index"] = "16"
tmp = [(k, v["index"]) for k, v in group_list.items()]
sorted_group_list = sorted(tmp, key=lambda tup: int(tup[1]), reverse=False)
f.write("/* Group Infomration Element TLV Descriptor */\n")
@ -564,25 +551,9 @@ for (k, v) in sorted_type_list:
f.write("typedef ogs_tlv_octet_t ogs_pfcp_tlv_" + v_lower(k) + "_t;\n")
f.write("\n")
#for (k, v) in sorted_group_list:
# f.write("typedef struct _tlv_" + v_lower(k) + "_t ")
# f.write(" tlv_" + v_lower(k) + "_t;\n")
# f.write("\n")
tmp = []
f.write("/* Structure for Group Infomration Element */\n")
for (k, v) in sorted_group_list:
if v_lower(k) == "create_pdr":
tmp.append(k)
continue
if v_lower(k) == "create_far":
tmp.append(k)
continue
if v_lower(k) == "update_far":
tmp.append(k)
continue
if v_lower(k) == "application_id_s_pfds":
tmp.append(k)
continue
f.write("typedef struct ogs_pfcp_tlv_" + v_lower(k) + "_s {\n")
f.write(" ogs_tlv_presence_t presence;\n")
for ies in group_list[k]["ies"]:
@ -598,26 +569,7 @@ for (k, v) in sorted_group_list:
f.write(" /* Instance : " + ies["instance"] + " */\n")
else:
f.write(";\n")
f.write("} ogs_pfcp_tlv_" + v_lower(k) + "_t; ;\n")
f.write("\n")
for k in tmp:
f.write("typedef struct ogs_pfcp_tlv_" + v_lower(k) + "_s {\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("} ogs_pfcp_tlv_" + v_lower(k) + "_t; ;\n")
f.write("} ogs_pfcp_tlv_" + v_lower(k) + "_t;\n")
f.write("\n")
f.write("/* Structure for Message */\n")
@ -684,7 +636,7 @@ for (k, v) in sorted_type_list:
else:
f.write(" OGS_TLV_VAR_STR,\n")
f.write(" \"%s\",\n" % k)
f.write(" OGS_TLV_PFCP_%s_TYPE,\n" % v_upper(k))
f.write(" OGS_PFCP_%s_TYPE,\n" % v_upper(k))
if "size" in type_list[k]:
f.write(" %d,\n" % type_list[k]["size"])
else:
@ -707,7 +659,7 @@ for (k, v) in sorted_group_list:
f.write(" {\n")
for ies in group_list[k]["ies"]:
if v_lower(ies["ie_type"])=="cause" or v_lower(ies["ie_type"])=="sequence_number" or v_lower(ies["ie_type"])=="f_teid":
f.write(" &ogs_pfcp_tlv_desc_pfcp%s_%s,\n" % (v_lower(ies["ie_type"]), v_lower(ies["instance"])))
f.write(" &ogs_pfcp_tlv_desc_%s_%s,\n" % (v_lower(ies["ie_type"]), v_lower(ies["instance"])))
else:
f.write(" &ogs_pfcp_tlv_desc_%s_%s,\n" % (v_lower(ies["ie_type"]), v_lower(ies["instance"])))
f.write(" NULL,\n")
@ -723,14 +675,14 @@ for (k, v) in sorted_msg_list:
f.write(" 0, 0, 0, 0, {\n")
for ies in msg_list[k]["ies"]:
if v_lower(ies["ie_type"])=="cause" or v_lower(ies["ie_type"])=="sequence_number" or v_lower(ies["ie_type"])=="f_teid":
f.write(" &ogs_pfcp_tlv_desc_pfcp%s_%s,\n" % (v_lower(ies["ie_type"]), v_lower(ies["instance"])))
f.write(" &ogs_pfcp_tlv_desc_%s_%s,\n" % (v_lower(ies["ie_type"]), v_lower(ies["instance"])))
else:
f.write(" &ogs_pfcp_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("""int ogs_pfcp_parse_msg(ogs_pfcp_message_t *pfcp_message, pkbuf_t *pkbuf)
f.write("""int ogs_pfcp_parse_msg(ogs_pfcp_message_t *pfcp_message, ogs_pkbuf_t *pkbuf)
{
int rv = OGS_ERROR;
ogs_pfcp_header_t *h = NULL;
@ -751,7 +703,7 @@ f.write("""int ogs_pfcp_parse_msg(ogs_pfcp_message_t *pfcp_message, pkbuf_t *pkb
size = OGS_PFCP_HEADER_LEN-OGS_PFCP_SEID_LEN;
ogs_assert(ogs_pkbuf_pull(pkbuf, size));
memcpy(&pcfp_message->h, pkbuf->data - size, size);
memcpy(&pfcp_message->h, pkbuf->data - size, size);
if (h->seid_p) {
pfcp_message->h.seid = be64toh(pfcp_message->h.seid);
@ -768,9 +720,9 @@ f.write("""int ogs_pfcp_parse_msg(ogs_pfcp_message_t *pfcp_message, pkbuf_t *pkb
""")
for (k, v) in sorted_msg_list:
if "ies" in msg_list[k]:
f.write(" case OGS_PFCP_%s_TYPE:\n" % v_upper(k))
f.write(" case OGS_%s_TYPE:\n" % v_upper(k))
f.write(" rv = ogs_tlv_parse_msg(&pfcp_message->%s,\n" % v_lower(k))
f.write(" &ogs_pfcp_tlv_desc_%s, pkbuf, TLV_MODE_T2_L2);\n" % v_lower(k))
f.write(" &ogs_pfcp_tlv_desc_%s, pkbuf, OGS_TLV_MODE_T2_L2);\n" % v_lower(k))
f.write(" break;\n")
f.write(""" default:
ogs_warn("Not implmeneted(type:%d)", pfcp_message->h.type);
@ -782,7 +734,7 @@ f.write(""" default:
""")
f.write("""ogs_pkbuf_t *ogs_pfcp_build_msg(pfcp_message_t *pfcp_message)
f.write("""ogs_pkbuf_t *ogs_pfcp_build_msg(ogs_pfcp_message_t *pfcp_message)
{
ogs_pkbuf_t *pkbuf = NULL;
@ -792,9 +744,9 @@ f.write("""ogs_pkbuf_t *ogs_pfcp_build_msg(pfcp_message_t *pfcp_message)
""")
for (k, v) in sorted_msg_list:
if "ies" in msg_list[k]:
f.write(" case OGS_PFCP_%s_TYPE:\n" % v_upper(k))
f.write(" pkbuf = ogs_tlv_build_msg(&tlv_desc_%s,\n" % v_lower(k))
f.write(" &pfcp_message->%s, TLV_MODE_T2_L2);\n" % v_lower(k))
f.write(" case OGS_%s_TYPE:\n" % v_upper(k))
f.write(" pkbuf = ogs_tlv_build_msg(&ogs_pfcp_tlv_desc_%s,\n" % v_lower(k))
f.write(" &pfcp_message->%s, OGS_TLV_MODE_T2_L2);\n" % v_lower(k))
f.write(" break;\n")
f.write(""" default:
ogs_warn("Not implmeneted(type:%d)", pfcp_message->h.type);

76
lib/pfcp/types.c Normal file
View File

@ -0,0 +1,76 @@
/*
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
*
* This file is part of Open5GS.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "ogs-pfcp.h"
int __ogs_pfcp_domain;
const char *ogs_pfcp_cause_get_name(uint8_t cause)
{
switch(cause) {
case OGS_PFCP_CAUSE_SUCCESS:
return "OGS_PFCP_CAUSE_SUCCESS";
break;
case OGS_PFCP_CAUSE_REQUEST_REJECTED:
return "OGS_PFCP_CAUSE_REQUEST_REJECTED";
break;
case OGS_PFCP_CAUSE_SESSION_CONTEXT_NOT_FOUND:
return "OGS_PFCP_CAUSE_SESSION_CONTEXT_NOT_FOUND";
break;
case OGS_PFCP_CAUSE_MANDATORY_IE_MISSING:
return "OGS_PFCP_CAUSE_MANDATORY_IE_MISSING";
break;
case OGS_PFCP_CAUSE_CONDITIONAL_IE_MISSING:
return "OGS_PFCP_CAUSE_CONDITIONAL_IE_MISSING";
break;
case OGS_PFCP_CAUSE_INVALID_LENGTH:
return "OGS_PFCP_CAUSE_INVALID_LENGTH";
break;
case OGS_PFCP_CAUSE_MANDATORY_IE_INCORRECT:
return "OGS_PFCP_CAUSE_MANDATORY_IE_INCORRECT";
break;
case OGS_PFCP_CAUSE_INVALID_FORWARDING_POLICY:
return "OGS_PFCP_CAUSE_INVALID_FORWARDING_POLICY";
break;
case OGS_PFCP_CAUSE_INVALID_F_TEID_ALLOCATION_OPTION:
return "OGS_PFCP_CAUSE_INVALID_F_TEID_ALLOCATION_OPTION";
break;
case OGS_PFCP_CAUSE_NO_ESTABLISHED_PFCP_ASSOCIATION:
return "OGS_PFCP_CAUSE_NO_ESTABLISHED_PFCP_ASSOCIATION";
break;
case OGS_PFCP_CAUSE_RULE_CREATION_MODIFICATION_FAILURE:
return "OGS_PFCP_CAUSE_RULE_CREATION_MODIFICATION_FAILURE";
break;
case OGS_PFCP_CAUSE_PFCP_ENTITY_IN_CONGESTION:
return "OGS_PFCP_CAUSE_PFCP_ENTITY_IN_CONGESTION";
break;
case OGS_PFCP_CAUSE_NO_RESOURCES_AVAILABLE:
return "OGS_PFCP_CAUSE_NO_RESOURCES_AVAILABLE";
break;
case OGS_PFCP_CAUSE_SERVICE_NOT_SUPPORTED:
return "OGS_PFCP_CAUSE_SERVICE_NOT_SUPPORTED";
break;
case OGS_PFCP_CAUSE_SYSTEM_FAILURE:
return "OGS_PFCP_CAUSE_SYSTEM_FAILURE";
break;
default:
break;
}
return "OGS_PFCP_CAUSE_UNKNOWN";
}

220
lib/pfcp/types.h Normal file
View File

@ -0,0 +1,220 @@
/*
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
*
* This file is part of Open5GS.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#if !defined(OGS_PFCP_INSIDE) && !defined(OGS_PFCP_COMPILATION)
#error "This header cannot be included directly."
#endif
#ifndef OGS_PFCP_TYPES_H
#define OGS_PFCP_TYPES_H
#ifdef __cplusplus
extern "C" {
#endif
#define OGS_PFCP_CAUSE_SUCCESS 1
#define OGS_PFCP_CAUSE_REQUEST_REJECTED 64
#define OGS_PFCP_CAUSE_SESSION_CONTEXT_NOT_FOUND 65
#define OGS_PFCP_CAUSE_MANDATORY_IE_MISSING 66
#define OGS_PFCP_CAUSE_CONDITIONAL_IE_MISSING 67
#define OGS_PFCP_CAUSE_INVALID_LENGTH 68
#define OGS_PFCP_CAUSE_MANDATORY_IE_INCORRECT 69
#define OGS_PFCP_CAUSE_INVALID_FORWARDING_POLICY 70
#define OGS_PFCP_CAUSE_INVALID_F_TEID_ALLOCATION_OPTION 71
#define OGS_PFCP_CAUSE_NO_ESTABLISHED_PFCP_ASSOCIATION 72
#define OGS_PFCP_CAUSE_RULE_CREATION_MODIFICATION_FAILURE 73
#define OGS_PFCP_CAUSE_PFCP_ENTITY_IN_CONGESTION 74
#define OGS_PFCP_CAUSE_NO_RESOURCES_AVAILABLE 75
#define OGS_PFCP_CAUSE_SERVICE_NOT_SUPPORTED 76
#define OGS_PFCP_CAUSE_SYSTEM_FAILURE 77
const char *ogs_pfcp_cause_get_name(uint8_t cause);
#define OGS_PFCP_FAR_APPLY_ACTION_DROP 1
#define OGS_PFCP_FAR_APPLY_ACTION_FORW 2
#define OGS_PFCP_FAR_APPLY_ACTION_BUFF 4
#define OGS_PFCP_FAR_APPLY_ACTION_NOCP 8
#define OGS_PFCP_FAR_APPLY_ACTION_DUPL 16
#define OGS_PFCP_FAR_DEST_INTF_ACCESS 0 //$ DL traffic
#define OGS_PFCP_FAR_DEST_INTF_CORE 1 //$ UL traffic
#define OGS_PFCP_FAR_DEST_INTF_SGILAN 2 //$ SGi-LAN
#define OGS_PFCP_FAR_DEST_INTF_CPF 3 //$ CP-Function
#define OGS_PFCP_FAR_DEST_INTF_LIF 4 //$ LI Function
#define OGS_PGWC_PRECEDENCE_BASE 31
#define OGS_PFCP_OUTER_HDR_RMV_DESC_GTPU_IP4 0
#define OGS_PFCP_OUTER_HDR_RMV_DESC_GTPU_IP6 1
#define OGS_PFCP_OUTER_HDR_RMV_DESC_UDP_IP4 2
#define OGS_PFCP_OUTER_HDR_RMV_DESC_UDP_IP6 3
#define OGS_PFCP_OUTER_HDR_RMV_DESC_NULL 0xFF
#define OGS_PFCP_SRC_INTF_ACCESS 0 //$ UL traffic
#define OGS_PFCP_SRC_INTF_CORE 1 //$ DL traffic
#define OGS_PFCP_SRC_INTF_SGILAN 2 //$ SGi-LAN
#define OGS_PFCP_SRC_INTF_CP_F 3 //$ CP-function
#define OGS_PFCP_PDN_TYPE_IPV4 1
#define OGS_PFCP_PDN_TYPE_IPV6 2
#define OGS_PFCP_PDN_TYPE_IPV4V6 3
#define OGS_PFCP_PDN_TYPE_NONIP 4
#define OGS_PFCP_UE_IP_ADDR_HDR_LEN 1
#define OGS_PFCP_UE_IP_ADDR_IPV4_LEN \
OGS_IPV4_LEN + OGS_PFCP_UE_IP_ADDR_HDR_LEN
#define OGS_PFCP_UE_IP_ADDR_IPV6_LEN \
OGS_IPV6_LEN + OGS_PFCP_UE_IP_ADDR_HDR_LEN
#define OGS_PFCP_UE_IP_ADDR_IPV4V6_LEN \
OGS_IPV4V6_LEN + OGS_PFCP_UE_IP_ADDR_HDR_LEN
#define OGS_PFCP_UE_IP_ADDR_SOURCE 0
#define OGS_PFCP_UE_IP_ADDR_DESITINATION 1
typedef struct ogs_pfcp_ue_ip_addr_s {
ED4(uint8_t spare:5;,
uint8_t sd:1;, /* source or destination*/
uint8_t ipv4:1;,
uint8_t ipv6:1;)
union {
uint32_t addr;
uint8_t addr6[OGS_IPV6_LEN];
struct {
uint32_t addr;
uint8_t addr6[OGS_IPV6_LEN];
} both;
};
} __attribute__ ((packed)) ogs_pfcp_ue_ip_addr_t;
typedef struct ogs_pfcp_f_teid_s {
ED5(uint8_t spare:4;,
uint8_t chid:1;,
uint8_t ch:1;,
uint8_t ipv6:1;,
uint8_t ipv4:1;)
uint32_t teid;
union {
union {
uint32_t addr;
uint8_t addr6[OGS_IPV6_LEN];
struct {
uint32_t addr;
uint8_t addr6[OGS_IPV6_LEN];
} both;
};
uint8_t choose_id;
};
} __attribute__ ((packed)) ogs_pfcp_f_teid_t;
typedef struct ogs_pfcp_f_seid_s {
ED3(uint8_t spare:6;,
uint8_t ipv4:1;,
uint8_t ipv6:1;)
uint64_t seid;
union {
uint32_t addr;
uint8_t addr6[OGS_IPV6_LEN];
struct {
uint32_t addr;
uint8_t addr6[OGS_IPV6_LEN];
} both;
};
} __attribute__ ((packed)) ogs_pfcp_f_seid_t;
typedef struct ogs_pfcp_node_id_s {
ED2(uint8_t spare:4;,
uint8_t type:4;)
#define OGS_PFCP_NODE_ID_IPV4 0
#define OGS_PFCP_NODE_ID_IPV6 1
#define OGS_PFCP_NODE_ID_FQDN 2
#define OGS_PFPC_NODE_ID_LEN(__nid) \
(1 + ((__nid.type != PFCP_NODE_ID_IPV4) ? \
(__nid.type != PFCP_NODE_ID_IPV6 ? -1 : 16 ) : 4))
union {
uint32_t addr;
uint8_t addr6[OGS_IPV6_LEN];
};
} __attribute__ ((packed)) ogs_pfcp_node_id_t;
typedef struct ogs_pfcp_outer_hdr_s {
ED5(uint8_t spare:4;,
uint8_t udp_ipv6:1;,
uint8_t udp_ipv4:1;,
uint8_t gtpu_ipv6:1;,
uint8_t gtpu_ipv4:1;)
uint8_t void0;
uint32_t teid;
union {
uint32_t addr;
uint8_t addr6[OGS_IPV6_LEN];
struct {
uint32_t addr;
uint8_t addr6[OGS_IPV6_LEN];
} both;
};
} __attribute__ ((packed)) ogs_pfcp_outer_hdr_t;
typedef struct ogs_pfcp_report_type_s {
ED5(uint8_t spare0:4;,
uint8_t upir:1;, /* User Plane Inactivity Report */
uint8_t erir:1;, /* Error Indication Report */
uint8_t usar:1;, /* Usage Report */
uint8_t dldr:1;) /* Downlink Data Report */
} __attribute__ ((packed)) pfcp_report_type_t;
typedef struct ogs_pfcp_downlink_data_service_information_s {
#define OGS_PFCP_DOWNLINK_DATA_SERVICE_INFORMATION_LEN(__data) \
(sizeof(struct _pfcp_downlink_data_service_information_t) - \
(__data).ppi - (__data).qfii)
ED3(uint8_t spare1:6;,
uint8_t ppi:1;, /* Paging Policy Indication */
uint8_t qfii:1;)
ED2(
uint8_t spare2:2;,
uint8_t paging_policy_indication:6;
)
ED2(
uint8_t spare:2;,
uint8_t QFI:6;
)
} __attribute__ ((packed)) ogs_pfcp_downlink_data_service_information_t;
typedef struct ogs_pfcp_user_plane_ip_resource_information_s {
ED6(uint8_t spare1:1;,
uint8_t assosi:1;,
uint8_t assoni:1;,
uint8_t teidri:3;,
uint8_t v6:1;,
uint8_t v4:1;)
uint8_t teid_range:8;
uint32_t addr;
uint8_t addr6[OGS_IPV6_LEN];
uint8_t network_instance;
ED2(uint8_t spare2:4;,
uint8_t source_interface:4;
)
} __attribute__ ((packed)) ogs_pfcp_user_plane_ip_resource_information_t;
#ifdef __cplusplus
}
#endif
#endif /* OGS_PFCP_TYPES_H */

786
lib/pfcp/xact.c Normal file
View File

@ -0,0 +1,786 @@
/*
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
*
* This file is part of Open5GS.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "ogs-pfcp.h"
#define PFCP_MIN_XACT_ID 1
#define PFCP_MAX_XACT_ID 0x800000
#define PFCP_T3_RESPONSE_DURATION ogs_time_from_sec(3) /* 3 seconds */
#define PFCP_T3_RESPONSE_RETRY_COUNT 3
#define PFCP_T3_DUPLICATED_DURATION \
(PFCP_T3_RESPONSE_DURATION * PFCP_T3_RESPONSE_RETRY_COUNT) /* 9 seconds */
#define PFCP_T3_DUPLICATED_RETRY_COUNT 1
typedef enum {
PFCP_XACT_UNKNOWN_STAGE,
PFCP_XACT_INITIAL_STAGE,
PFCP_XACT_INTERMEDIATE_STAGE,
PFCP_XACT_FINAL_STAGE,
} ogs_pfcp_xact_stage_t;
static int ogs_pfcp_xact_initialized = 0;
static ogs_timer_mgr_t *g_timer_mgr = NULL;
static uint32_t g_xact_id = 0;
static OGS_POOL(pool, ogs_pfcp_xact_t);
static ogs_pfcp_xact_stage_t ogs_pfcp_xact_get_stage(uint8_t type, uint32_t sqn);
static int ogs_pfcp_xact_delete(ogs_pfcp_xact_t *xact);
static void response_timeout(void *data);
static void holding_timeout(void *data);
int ogs_pfcp_xact_init(ogs_timer_mgr_t *timer_mgr, int size)
{
ogs_assert(ogs_pfcp_xact_initialized == 0);
ogs_pool_init(&pool, size);
g_xact_id = 0;
g_timer_mgr = timer_mgr;
ogs_pfcp_xact_initialized = 1;
return OGS_OK;
}
int ogs_pfcp_xact_final(void)
{
ogs_assert(ogs_pfcp_xact_initialized == 1);
ogs_pool_final(&pool);
ogs_pfcp_xact_initialized = 0;
return OGS_OK;
}
ogs_pfcp_xact_t *ogs_pfcp_xact_local_create(ogs_pfcp_node_t *pnode,
ogs_pfcp_header_t *hdesc, ogs_pkbuf_t *pkbuf,
void (*cb)(ogs_pfcp_xact_t *xact, void *data), void *data)
{
int rv;
char buf[OGS_ADDRSTRLEN];
ogs_pfcp_xact_t *xact = NULL;
ogs_assert(pnode);
ogs_pool_alloc(&pool, &xact);
ogs_assert(xact);
memset(xact, 0, sizeof *xact);
xact->index = ogs_pool_index(&pool, xact);
xact->org = OGS_PFCP_LOCAL_ORIGINATOR;
xact->xid = OGS_NEXT_ID(g_xact_id, PFCP_MIN_XACT_ID, PFCP_MAX_XACT_ID);
xact->pnode = pnode;
xact->cb = cb;
xact->data = data;
xact->tm_response = ogs_timer_add(g_timer_mgr, response_timeout, xact);
ogs_assert(xact->tm_response);
xact->response_rcount = PFCP_T3_RESPONSE_RETRY_COUNT;
xact->tm_holding = ogs_timer_add(g_timer_mgr, holding_timeout, xact);
ogs_assert(xact->tm_holding);
xact->holding_rcount = PFCP_T3_DUPLICATED_RETRY_COUNT;
ogs_list_add(xact->org == OGS_PFCP_LOCAL_ORIGINATOR ?
&xact->pnode->local_list : &xact->pnode->remote_list, xact);
rv = ogs_pfcp_xact_update_tx(xact, hdesc, pkbuf);
if (rv != OGS_OK) {
ogs_error("ogs_pfcp_xact_update_tx() failed");
ogs_pfcp_xact_delete(xact);
return NULL;
}
ogs_debug("[%d] %s Create peer [%s]:%d",
xact->xid,
xact->org == OGS_PFCP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
OGS_ADDR(&pnode->remote_addr, buf),
OGS_PORT(&pnode->remote_addr));
return xact;
}
ogs_pfcp_xact_t *ogs_pfcp_xact_remote_create(
ogs_pfcp_node_t *pnode, uint32_t sqn)
{
char buf[OGS_ADDRSTRLEN];
ogs_pfcp_xact_t *xact = NULL;
ogs_assert(pnode);
ogs_pool_alloc(&pool, &xact);
ogs_assert(xact);
memset(xact, 0, sizeof *xact);
xact->index = ogs_pool_index(&pool, xact);
xact->org = OGS_PFCP_REMOTE_ORIGINATOR;
xact->xid = OGS_PFCP_SQN_TO_XID(sqn);
xact->pnode = pnode;
xact->tm_response = ogs_timer_add(g_timer_mgr, response_timeout, xact);
ogs_assert(xact->tm_response);
xact->response_rcount = PFCP_T3_RESPONSE_RETRY_COUNT;
xact->tm_holding = ogs_timer_add(g_timer_mgr, holding_timeout, xact);
ogs_assert(xact->tm_holding);
xact->holding_rcount = PFCP_T3_DUPLICATED_RETRY_COUNT;
ogs_list_add(xact->org == OGS_PFCP_LOCAL_ORIGINATOR ?
&xact->pnode->local_list : &xact->pnode->remote_list, xact);
ogs_debug("[%d] %s Create peer [%s]:%d",
xact->xid,
xact->org == OGS_PFCP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
OGS_ADDR(&pnode->remote_addr, buf),
OGS_PORT(&pnode->remote_addr));
return xact;
}
void ogs_pfcp_xact_delete_all(ogs_pfcp_node_t *pnode)
{
ogs_pfcp_xact_t *xact = NULL, *next_xact = NULL;
ogs_list_for_each_safe(&pnode->local_list, next_xact, xact)
ogs_pfcp_xact_delete(xact);
ogs_list_for_each_safe(&pnode->remote_list, next_xact, xact)
ogs_pfcp_xact_delete(xact);
}
int ogs_pfcp_xact_update_tx(ogs_pfcp_xact_t *xact,
ogs_pfcp_header_t *hdesc, ogs_pkbuf_t *pkbuf)
{
char buf[OGS_ADDRSTRLEN];
ogs_pfcp_xact_stage_t stage;
ogs_pfcp_header_t *h = NULL;
ogs_assert(xact);
ogs_assert(xact->pnode);
ogs_assert(hdesc);
ogs_assert(pkbuf);
ogs_debug("[%d] %s UPD TX-%d peer [%s]:%d",
xact->xid,
xact->org == OGS_PFCP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
hdesc->type,
OGS_ADDR(&xact->pnode->remote_addr, buf),
OGS_PORT(&xact->pnode->remote_addr));
stage = ogs_pfcp_xact_get_stage(hdesc->type, xact->xid);
if (xact->org == OGS_PFCP_LOCAL_ORIGINATOR) {
switch (stage) {
case PFCP_XACT_INITIAL_STAGE:
if (xact->step != 0) {
ogs_error("invalid step[%d]", xact->step);
ogs_pkbuf_free(pkbuf);
return OGS_ERROR;
}
break;
case PFCP_XACT_INTERMEDIATE_STAGE:
ogs_expect(0);
ogs_pkbuf_free(pkbuf);
return OGS_ERROR;
case PFCP_XACT_FINAL_STAGE:
if (xact->step != 2) {
ogs_error("invalid step[%d]", xact->step);
ogs_pkbuf_free(pkbuf);
return OGS_ERROR;
}
break;
default:
ogs_assert_if_reached();
break;
}
} else if (xact->org == OGS_PFCP_REMOTE_ORIGINATOR) {
switch (stage) {
case PFCP_XACT_INITIAL_STAGE:
ogs_expect(0);
ogs_pkbuf_free(pkbuf);
return OGS_ERROR;
case PFCP_XACT_INTERMEDIATE_STAGE:
case PFCP_XACT_FINAL_STAGE:
if (xact->step != 1) {
ogs_error("invalid step[%d]", xact->step);
ogs_pkbuf_free(pkbuf);
return OGS_ERROR;
}
break;
default:
ogs_error("invalid stage[%d]", stage);
ogs_pkbuf_free(pkbuf);
return OGS_ERROR;
}
} else {
ogs_error("invalid org[%d]", xact->org);
ogs_pkbuf_free(pkbuf);
return OGS_ERROR;
}
if (h->type >= OGS_PFCP_SESSION_ESTABLISHMENT_REQUEST_TYPE)
ogs_pkbuf_push(pkbuf, OGS_PFCP_HEADER_LEN);
else
ogs_pkbuf_push(pkbuf, OGS_PFCP_HEADER_LEN - OGS_PFCP_SEID_LEN);
h = (ogs_pfcp_header_t *)pkbuf->data;
ogs_assert(h);
memset(h, 0, sizeof(ogs_pfcp_header_t));
h->version = 1;
h->type = hdesc->type;
if (h->type >= OGS_PFCP_SESSION_ESTABLISHMENT_REQUEST_TYPE) {
h->seid_p = 1;
h->seid = htobe64(hdesc->seid);
h->sqn = OGS_PFCP_XID_TO_SQN(xact->xid);
} else {
h->seid_p = 1;
h->sqn_only = OGS_PFCP_XID_TO_SQN(xact->xid);
}
h->length = htons(pkbuf->len - 4);
/* 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 OGS_OK;
}
int ogs_pfcp_xact_update_rx(ogs_pfcp_xact_t *xact, uint8_t type)
{
int rv = OGS_OK;
char buf[OGS_ADDRSTRLEN];
ogs_pfcp_xact_stage_t stage;
ogs_debug("[%d] %s UPD RX-%d peer [%s]:%d",
xact->xid,
xact->org == OGS_PFCP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
type,
OGS_ADDR(&xact->pnode->remote_addr, buf),
OGS_PORT(&xact->pnode->remote_addr));
stage = ogs_pfcp_xact_get_stage(type, xact->xid);
if (xact->org == OGS_PFCP_LOCAL_ORIGINATOR) {
switch (stage) {
case PFCP_XACT_INITIAL_STAGE:
ogs_expect(0);
return OGS_ERROR;
case PFCP_XACT_INTERMEDIATE_STAGE:
if (xact->seq[1].type == type) {
ogs_pkbuf_t *pkbuf = NULL;
if (xact->step != 2 && xact->step != 3) {
ogs_error("invalid step[%d]", xact->step);
ogs_pkbuf_free(pkbuf);
return OGS_ERROR;
}
pkbuf = xact->seq[2].pkbuf;
if (pkbuf) {
if (xact->tm_holding)
ogs_timer_start(
xact->tm_holding, PFCP_T3_DUPLICATED_DURATION);
ogs_warn("[%d] %s Request Duplicated. Retransmit!"
" for step %d type %d peer [%s]:%d",
xact->xid,
xact->org == OGS_PFCP_LOCAL_ORIGINATOR ?
"LOCAL " : "REMOTE",
xact->step, type,
OGS_ADDR(&xact->pnode->remote_addr,
buf),
OGS_PORT(&xact->pnode->remote_addr));
rv = ogs_pfcp_sendto(xact->pnode, pkbuf);
ogs_expect(rv == OGS_OK);
} else {
ogs_warn("[%d] %s Request Duplicated. Discard!"
" for step %d type %d peer [%s]:%d",
xact->xid,
xact->org == OGS_PFCP_LOCAL_ORIGINATOR ?
"LOCAL " : "REMOTE",
xact->step, type,
OGS_ADDR(&xact->pnode->remote_addr,
buf),
OGS_PORT(&xact->pnode->remote_addr));
}
return OGS_RETRY;
}
if (xact->step != 1) {
ogs_error("invalid step[%d]", xact->step);
return OGS_ERROR;
}
if (xact->tm_holding)
ogs_timer_start(
xact->tm_holding, PFCP_T3_DUPLICATED_DURATION);
break;
case PFCP_XACT_FINAL_STAGE:
if (xact->step != 1) {
ogs_error("invalid step[%d]", xact->step);
return OGS_ERROR;
}
break;
default:
ogs_error("invalid stage[%d]", stage);
return OGS_ERROR;
}
} else if (xact->org == OGS_PFCP_REMOTE_ORIGINATOR) {
switch (stage) {
case PFCP_XACT_INITIAL_STAGE:
if (xact->seq[0].type == type) {
ogs_pkbuf_t *pkbuf = NULL;
if (xact->step != 1 && xact->step != 2) {
ogs_error("invalid step[%d]", xact->step);
return OGS_ERROR;
}
pkbuf = xact->seq[1].pkbuf;
if (pkbuf) {
if (xact->tm_holding)
ogs_timer_start(
xact->tm_holding, PFCP_T3_DUPLICATED_DURATION);
ogs_warn("[%d] %s Request Duplicated. Retransmit!"
" for step %d type %d peer [%s]:%d",
xact->xid,
xact->org == OGS_PFCP_LOCAL_ORIGINATOR ?
"LOCAL " : "REMOTE",
xact->step, type,
OGS_ADDR(&xact->pnode->remote_addr,
buf),
OGS_PORT(&xact->pnode->remote_addr));
rv = ogs_pfcp_sendto(xact->pnode, pkbuf);
ogs_expect(rv == OGS_OK);
} else {
ogs_warn("[%d] %s Request Duplicated. Discard!"
" for step %d type %d peer [%s]:%d",
xact->xid,
xact->org == OGS_PFCP_LOCAL_ORIGINATOR ?
"LOCAL " : "REMOTE",
xact->step, type,
OGS_ADDR(&xact->pnode->remote_addr,
buf),
OGS_PORT(&xact->pnode->remote_addr));
}
return OGS_RETRY;
}
if (xact->step != 0) {
ogs_error("invalid step[%d]", xact->step);
return OGS_ERROR;
}
if (xact->tm_holding)
ogs_timer_start(
xact->tm_holding, PFCP_T3_DUPLICATED_DURATION);
break;
case PFCP_XACT_INTERMEDIATE_STAGE:
ogs_expect(0);
return OGS_ERROR;
case PFCP_XACT_FINAL_STAGE:
if (xact->step != 2) {
ogs_error("invalid step[%d]", xact->step);
return OGS_ERROR;
}
/* continue */
break;
default:
ogs_error("invalid stage[%d]", stage);
return OGS_ERROR;
}
} else {
ogs_error("invalid org[%d]", xact->org);
return OGS_ERROR;
}
if (xact->tm_response)
ogs_timer_stop(xact->tm_response);
/* Save Message type of this step */
xact->seq[xact->step].type = type;
/* Step */
xact->step++;
return OGS_OK;
}
int ogs_pfcp_xact_commit(ogs_pfcp_xact_t *xact)
{
int rv;
char buf[OGS_ADDRSTRLEN];
uint8_t type;
ogs_pkbuf_t *pkbuf = NULL;
ogs_pfcp_xact_stage_t stage;
ogs_assert(xact);
ogs_assert(xact->pnode);
ogs_debug("[%d] %s Commit peer [%s]:%d",
xact->xid,
xact->org == OGS_PFCP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
OGS_ADDR(&xact->pnode->remote_addr, buf),
OGS_PORT(&xact->pnode->remote_addr));
type = xact->seq[xact->step-1].type;
stage = ogs_pfcp_xact_get_stage(type, xact->xid);
if (xact->org == OGS_PFCP_LOCAL_ORIGINATOR) {
switch (stage) {
case PFCP_XACT_INITIAL_STAGE:
if (xact->step != 1) {
ogs_error("invalid step[%d]", xact->step);
ogs_pfcp_xact_delete(xact);
return OGS_ERROR;
}
if (xact->tm_response)
ogs_timer_start(xact->tm_response, PFCP_T3_RESPONSE_DURATION);
break;
case PFCP_XACT_INTERMEDIATE_STAGE:
ogs_expect(0);
ogs_pfcp_xact_delete(xact);
return OGS_ERROR;
case PFCP_XACT_FINAL_STAGE:
if (xact->step != 2 && xact->step != 3) {
ogs_error("invalid step[%d]", xact->step);
ogs_pfcp_xact_delete(xact);
return OGS_ERROR;
}
if (xact->step == 2) {
ogs_pfcp_xact_delete(xact);
return OGS_OK;
}
break;
default:
ogs_error("invalid stage[%d]", stage);
ogs_pfcp_xact_delete(xact);
return OGS_ERROR;
}
} else if (xact->org == OGS_PFCP_REMOTE_ORIGINATOR) {
switch (stage) {
case PFCP_XACT_INITIAL_STAGE:
ogs_expect(0);
ogs_pfcp_xact_delete(xact);
return OGS_ERROR;
case PFCP_XACT_INTERMEDIATE_STAGE:
if (xact->step != 2) {
ogs_error("invalid step[%d]", xact->step);
ogs_pfcp_xact_delete(xact);
return OGS_ERROR;
}
if (xact->tm_response)
ogs_timer_start(
xact->tm_response, PFCP_T3_RESPONSE_DURATION);
break;
case PFCP_XACT_FINAL_STAGE:
if (xact->step != 2 && xact->step != 3) {
ogs_error("invalid step[%d]", xact->step);
ogs_pfcp_xact_delete(xact);
return OGS_ERROR;
}
if (xact->step == 3) {
ogs_pfcp_xact_delete(xact);
return OGS_OK;
}
break;
default:
ogs_error("invalid stage[%d]", stage);
ogs_pfcp_xact_delete(xact);
return OGS_ERROR;
}
} else {
ogs_error("invalid org[%d]", xact->org);
ogs_pfcp_xact_delete(xact);
return OGS_ERROR;
}
pkbuf = xact->seq[xact->step-1].pkbuf;
ogs_assert(pkbuf);
rv = ogs_pfcp_sendto(xact->pnode, pkbuf);
ogs_expect(rv == OGS_OK);
return OGS_OK;
}
static void response_timeout(void *data)
{
char buf[OGS_ADDRSTRLEN];
ogs_pfcp_xact_t *xact = data;
ogs_assert(xact);
ogs_assert(xact->pnode);
ogs_debug("[%d] %s Response Timeout "
"for step %d type %d peer [%s]:%d",
xact->xid,
xact->org == OGS_PFCP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
xact->step, xact->seq[xact->step-1].type,
OGS_ADDR(&xact->pnode->remote_addr, buf),
OGS_PORT(&xact->pnode->remote_addr));
if (--xact->response_rcount > 0) {
ogs_pkbuf_t *pkbuf = NULL;
if (xact->tm_response)
ogs_timer_start(xact->tm_response, PFCP_T3_RESPONSE_DURATION);
pkbuf = xact->seq[xact->step-1].pkbuf;
ogs_assert(pkbuf);
if (ogs_pfcp_sendto(xact->pnode, pkbuf) != OGS_OK) {
ogs_error("ogs_pfcp_sendto() failed");
goto out;
}
} else {
ogs_warn("[%d] %s No Reponse. Give up! "
"for step %d type %d peer [%s]:%d",
xact->xid,
xact->org == OGS_PFCP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
xact->step, xact->seq[xact->step-1].type,
OGS_ADDR(&xact->pnode->remote_addr, buf),
OGS_PORT(&xact->pnode->remote_addr));
if (xact->cb)
xact->cb(xact, xact->data);
ogs_pfcp_xact_delete(xact);
}
return;
out:
ogs_pfcp_xact_delete(xact);
}
static void holding_timeout(void *data)
{
char buf[OGS_ADDRSTRLEN];
ogs_pfcp_xact_t *xact = data;
ogs_assert(xact);
ogs_assert(xact->pnode);
ogs_debug("[%d] %s Holding Timeout "
"for step %d type %d peer [%s]:%d",
xact->xid,
xact->org == OGS_PFCP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
xact->step, xact->seq[xact->step-1].type,
OGS_ADDR(&xact->pnode->remote_addr, buf),
OGS_PORT(&xact->pnode->remote_addr));
if (--xact->holding_rcount > 0) {
if (xact->tm_holding)
ogs_timer_start(xact->tm_holding, PFCP_T3_DUPLICATED_DURATION);
} else {
ogs_debug("[%d] %s Delete Transaction "
"for step %d type %d peer [%s]:%d",
xact->xid,
xact->org == OGS_PFCP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
xact->step, xact->seq[xact->step-1].type,
OGS_ADDR(&xact->pnode->remote_addr, buf),
OGS_PORT(&xact->pnode->remote_addr));
ogs_pfcp_xact_delete(xact);
}
}
int ogs_pfcp_xact_receive(
ogs_pfcp_node_t *pnode, ogs_pfcp_header_t *h, ogs_pfcp_xact_t **xact)
{
char buf[OGS_ADDRSTRLEN];
int rv;
ogs_pfcp_xact_t *new = NULL;
ogs_assert(pnode);
ogs_assert(h);
new = ogs_pfcp_xact_find_by_xid(
pnode, h->type, OGS_PFCP_SQN_TO_XID(h->sqn));
if (!new)
new = ogs_pfcp_xact_remote_create(pnode, h->sqn);
ogs_assert(new);
ogs_debug("[%d] %s Receive peer [%s]:%d",
new->xid,
new->org == OGS_PFCP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
OGS_ADDR(&pnode->remote_addr, buf),
OGS_PORT(&pnode->remote_addr));
rv = ogs_pfcp_xact_update_rx(new, h->type);
if (rv != OGS_OK) {
ogs_error("ogs_pfcp_xact_update_rx() failed");
ogs_pfcp_xact_delete(new);
return rv;
}
*xact = new;
return OGS_OK;
}
ogs_pfcp_xact_t *ogs_pfcp_xact_find(ogs_index_t index)
{
ogs_assert(index);
return ogs_pool_find(&pool, index);
}
static ogs_pfcp_xact_stage_t ogs_pfcp_xact_get_stage(uint8_t type, uint32_t xid)
{
ogs_pfcp_xact_stage_t stage = PFCP_XACT_UNKNOWN_STAGE;
switch (type) {
case OGS_PFCP_HEARTBEAT_REQUEST_TYPE:
case OGS_PFCP_ASSOCIATION_SETUP_REQUEST_TYPE:
case OGS_PFCP_ASSOCIATION_UPDATE_REQUEST_TYPE:
case OGS_PFCP_ASSOCIATION_RELEASE_REQUEST_TYPE:
case OGS_PFCP_SESSION_ESTABLISHMENT_REQUEST_TYPE:
case OGS_PFCP_SESSION_MODIFICATION_REQUEST_TYPE:
case OGS_PFCP_SESSION_DELETION_REQUEST_TYPE:
stage = PFCP_XACT_INITIAL_STAGE;
break;
case OGS_PFCP_HEARTBEAT_RESPONSE_TYPE:
case OGS_PFCP_ASSOCIATION_SETUP_RESPONSE_TYPE:
case OGS_PFCP_ASSOCIATION_UPDATE_RESPONSE_TYPE:
case OGS_PFCP_ASSOCIATION_RELEASE_RESPONSE_TYPE:
case OGS_PFCP_VERSION_NOT_SUPPORTED_RESPONSE_TYPE:
case OGS_PFCP_SESSION_ESTABLISHMENT_RESPONSE_TYPE:
case OGS_PFCP_SESSION_MODIFICATION_RESPONSE_TYPE:
case OGS_PFCP_SESSION_DELETION_RESPONSE_TYPE:
stage = PFCP_XACT_FINAL_STAGE;
break;
default:
ogs_error("Not implemented PFCPv2 Message Type(%d)", type);
break;
}
return stage;
}
ogs_pfcp_xact_t *ogs_pfcp_xact_find_by_xid(
ogs_pfcp_node_t *pnode, uint8_t type, uint32_t xid)
{
char buf[OGS_ADDRSTRLEN];
ogs_list_t *list = NULL;
ogs_pfcp_xact_t *xact = NULL;
ogs_assert(pnode);
switch (ogs_pfcp_xact_get_stage(type, xid)) {
case PFCP_XACT_INITIAL_STAGE:
list = &pnode->remote_list;
break;
case PFCP_XACT_INTERMEDIATE_STAGE:
list = &pnode->local_list;
break;
case PFCP_XACT_FINAL_STAGE:
if (xid & PFCP_MAX_XACT_ID)
list = &pnode->remote_list;
else
list = &pnode->local_list;
break;
default:
ogs_assert_if_reached();
break;
}
ogs_assert(list);
ogs_list_for_each(list, xact) {
if (xact->xid == xid) {
ogs_debug("[%d] %s Find peer [%s]:%d",
xact->xid,
xact->org == OGS_PFCP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
OGS_ADDR(&pnode->remote_addr, buf),
OGS_PORT(&pnode->remote_addr));
break;
}
}
return xact;
}
static int ogs_pfcp_xact_delete(ogs_pfcp_xact_t *xact)
{
char buf[OGS_ADDRSTRLEN];
ogs_assert(xact);
ogs_assert(xact->pnode);
ogs_debug("[%d] %s Delete peer [%s]:%d",
xact->xid,
xact->org == OGS_PFCP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
OGS_ADDR(&xact->pnode->remote_addr, buf),
OGS_PORT(&xact->pnode->remote_addr));
if (xact->seq[0].pkbuf)
ogs_pkbuf_free(xact->seq[0].pkbuf);
if (xact->seq[1].pkbuf)
ogs_pkbuf_free(xact->seq[1].pkbuf);
if (xact->seq[2].pkbuf)
ogs_pkbuf_free(xact->seq[2].pkbuf);
if (xact->tm_response)
ogs_timer_delete(xact->tm_response);
if (xact->tm_holding)
ogs_timer_delete(xact->tm_holding);
ogs_list_remove(xact->org == OGS_PFCP_LOCAL_ORIGINATOR ?
&xact->pnode->local_list : &xact->pnode->remote_list, xact);
ogs_pool_free(&pool, xact);
return OGS_OK;
}

91
lib/pfcp/xact.h Normal file
View File

@ -0,0 +1,91 @@
/*
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
*
* This file is part of Open5GS.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#if !defined(OGS_PFCP_INSIDE) && !defined(OGS_PFCP_COMPILATION)
#error "This header cannot be included directly."
#endif
#ifndef OGS_PFCP_XACT_H
#define OGS_PFCP_XACT_H
#ifdef __cplusplus
extern "C" {
#endif
/**
* Transaction context
*/
typedef struct ogs_pfcp_xact_s {
ogs_lnode_t node; /**< A node of list */
ogs_index_t index;
#define OGS_PFCP_LOCAL_ORIGINATOR 0
#define OGS_PFCP_REMOTE_ORIGINATOR 1
uint8_t org; /**< Transaction' originator.
local or remote */
uint32_t xid; /**< Transaction ID */
ogs_pfcp_node_t *pnode; /**< Relevant PFCP node context */
void (*cb)(ogs_pfcp_xact_t *, void *); /**< Local timer expiration handler */
void *data; /**< Transaction Data */
int step; /**< Current step in the sequence.
1 : Initial
2 : Triggered
3 : Triggered-Reply */
struct {
uint8_t type; /**< Message type history */
ogs_pkbuf_t *pkbuf; /**< Packet history */
} seq[3]; /**< history for the each step */
ogs_timer_t *tm_response; /**< Timer waiting for next message */
uint8_t response_rcount;
ogs_timer_t *tm_holding; /**< Timer waiting for holding message */
uint8_t holding_rcount;
} ogs_pfcp_xact_t;
int ogs_pfcp_xact_init(ogs_timer_mgr_t *timer_mgr, int size);
int ogs_pfcp_xact_final(void);
ogs_pfcp_xact_t *ogs_pfcp_xact_local_create(ogs_pfcp_node_t *pnode,
ogs_pfcp_header_t *hdesc, ogs_pkbuf_t *pkbuf,
void (*cb)(ogs_pfcp_xact_t *xact, void *data), void *data);
ogs_pfcp_xact_t *ogs_pfcp_xact_remote_create(
ogs_pfcp_node_t *pnode, uint32_t sqn);
void ogs_pfcp_xact_delete_all(ogs_pfcp_node_t *pnode);
int ogs_pfcp_xact_update_tx(ogs_pfcp_xact_t *xact,
ogs_pfcp_header_t *hdesc, ogs_pkbuf_t *pkbuf);
int ogs_pfcp_xact_update_rx(ogs_pfcp_xact_t *xact, uint8_t type);
int ogs_pfcp_xact_commit(ogs_pfcp_xact_t *xact);
int ogs_pfcp_xact_receive(ogs_pfcp_node_t *pnode,
ogs_pfcp_header_t *h, ogs_pfcp_xact_t **xact);
ogs_pfcp_xact_t *ogs_pfcp_xact_find(ogs_index_t index);
ogs_pfcp_xact_t *ogs_pfcp_xact_find_by_xid(
ogs_pfcp_node_t *pnode, uint8_t type, uint32_t xid);
#ifdef __cplusplus
}
#endif
#endif /* OGS_PFCP_XACT_H */

View File

@ -665,9 +665,9 @@ ogs_pkbuf_t *mme_s11_build_create_indirect_data_forwarding_tunnel_request(
ogs_gtp_create_indirect_data_forwarding_tunnel_request_t *req =
&gtp_message.create_indirect_data_forwarding_tunnel_request;
ogs_gtp_tlv_bearer_context_t *bearers[GTP_MAX_NUM_OF_INDIRECT_TUNNEL];
ogs_gtp_f_teid_t dl_teid[GTP_MAX_NUM_OF_INDIRECT_TUNNEL];
ogs_gtp_f_teid_t ul_teid[GTP_MAX_NUM_OF_INDIRECT_TUNNEL];
ogs_gtp_tlv_bearer_context_t *bearers[OGS_GTP_MAX_INDIRECT_TUNNEL];
ogs_gtp_f_teid_t dl_teid[OGS_GTP_MAX_INDIRECT_TUNNEL];
ogs_gtp_f_teid_t ul_teid[OGS_GTP_MAX_INDIRECT_TUNNEL];
int len;
ogs_assert(mme_ue);

View File

@ -680,7 +680,7 @@ void mme_s11_handle_create_indirect_data_forwarding_tunnel_response(
enb_ue_t *source_ue = NULL;
int i;
ogs_gtp_tlv_bearer_context_t *bearers[GTP_MAX_NUM_OF_INDIRECT_TUNNEL];
ogs_gtp_tlv_bearer_context_t *bearers[OGS_GTP_MAX_INDIRECT_TUNNEL];
ogs_gtp_f_teid_t *teid = NULL;
ogs_assert(xact);

View File

@ -974,11 +974,11 @@ void sgw_s11_handle_create_indirect_data_forwarding_tunnel_request(
sgw_tunnel_t *tunnel = NULL;
ogs_gtp_cause_t cause;
ogs_gtp_tlv_bearer_context_t *req_bearers[GTP_MAX_NUM_OF_INDIRECT_TUNNEL];
ogs_gtp_tlv_bearer_context_t *rsp_bearers[GTP_MAX_NUM_OF_INDIRECT_TUNNEL];
ogs_gtp_tlv_bearer_context_t *req_bearers[OGS_GTP_MAX_INDIRECT_TUNNEL];
ogs_gtp_tlv_bearer_context_t *rsp_bearers[OGS_GTP_MAX_INDIRECT_TUNNEL];
ogs_gtp_f_teid_t *req_teid = NULL;
ogs_gtp_f_teid_t rsp_dl_teid[GTP_MAX_NUM_OF_INDIRECT_TUNNEL];
ogs_gtp_f_teid_t rsp_ul_teid[GTP_MAX_NUM_OF_INDIRECT_TUNNEL];
ogs_gtp_f_teid_t rsp_dl_teid[OGS_GTP_MAX_INDIRECT_TUNNEL];
ogs_gtp_f_teid_t rsp_ul_teid[OGS_GTP_MAX_INDIRECT_TUNNEL];
int len;
ogs_assert(s11_xact);