Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-Spgwu-Tiny-Simple
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
CommunityXG
OpenXG-Spgwu-Tiny-Simple
Commits
149aa8b6
Commit
149aa8b6
authored
Mar 25, 2019
by
gauthier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cppcheck warnings in progress
parent
2fbb8947
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
524 additions
and
96 deletions
+524
-96
src/gtpv2c/3gpp_29.274.hpp
src/gtpv2c/3gpp_29.274.hpp
+207
-50
src/gtpv2c/msg_gtpv2c.hpp
src/gtpv2c/msg_gtpv2c.hpp
+317
-46
No files found.
src/gtpv2c/3gpp_29.274.hpp
View file @
149aa8b6
...
...
@@ -148,6 +148,13 @@ public:
explicit
gtpv2c_grouped_ie
(
const
gtpv2c_tlv
&
t
)
:
gtpv2c_ie
(
t
),
ies
()
{}
explicit
gtpv2c_grouped_ie
(
const
uint8_t
tlv_type
)
:
gtpv2c_ie
(
tlv_type
),
ies
()
{}
gtpv2c_grouped_ie
&
operator
=
(
gtpv2c_grouped_ie
other
)
{
this
->
gtpv2c_ie
::
operator
=
(
other
);
std
::
swap
(
ies
,
other
.
ies
);
return
*
this
;
}
virtual
~
gtpv2c_grouped_ie
()
{
ies
.
clear
();
...
...
@@ -228,6 +235,17 @@ public:
u2
.
b
=
h
.
u2
.
b
;
}
gtpv2c_msg_header
&
operator
=
(
gtpv2c_msg_header
other
)
{
std
::
swap
(
u1
,
other
.
u1
);
std
::
swap
(
message_type
,
other
.
message_type
);
std
::
swap
(
message_length
,
other
.
message_length
);
std
::
swap
(
teid
,
other
.
teid
);
std
::
swap
(
sequence_number
,
other
.
sequence_number
);
std
::
swap
(
u2
,
other
.
u2
);
return
*
this
;
}
void
set_teid
(
const
uint32_t
&
tid
)
{
teid
=
tid
;
if
(
u1
.
bf
.
t
==
0
)
{
...
...
@@ -322,6 +340,13 @@ public:
gtpv2c_msg
(
const
gtpv2c_msg
&
m
)
:
gtpv2c_msg_header
(
m
),
remote_port
(
m
.
remote_port
),
ies
(
m
.
ies
)
{}
gtpv2c_msg
&
operator
=
(
gtpv2c_msg
other
)
{
std
::
swap
(
remote_port
,
other
.
remote_port
);
std
::
swap
(
ies
,
other
.
ies
);
return
*
this
;
}
explicit
gtpv2c_msg
(
const
gtpv2c_msg_header
&
hdr
)
:
gtpv2c_msg_header
(
hdr
),
remote_port
(
0
),
ies
()
{}
explicit
gtpv2c_msg
(
const
gtpv2c_echo_request
&
gtp_ies
);
...
...
@@ -1478,13 +1503,14 @@ public:
protocol_or_container_id
()
{
protocol_id
=
0
;
length_of_protocol_id_contents
=
0
;
protocol_id_contents
=
{};
}
explicit
protocol_or_container_id
(
std
::
istream
&
is
)
:
protocol_or_container_id
()
{
load_from
(
is
);
}
protocol_or_container_id
(
const
uint16_t
proto_id
,
const
std
::
string
&
proto_id_contents
)
:
protocol_id
(
proto_id
),
protocol_id_contents
(
proto_id_contents
),
length_of_protocol_id_contents
(
protocol_id_contents
.
size
()
)
{}
protocol_id
(
proto_id
),
length_of_protocol_id_contents
(
protocol_id_contents
.
size
()),
protocol_id_contents
(
proto_id_contents
)
{}
explicit
protocol_or_container_id
(
const
protocol_or_container_id
&
p
)
:
protocol_id
(
p
.
protocol_id
),
...
...
@@ -1496,6 +1522,13 @@ public:
length_of_protocol_id_contents
(
p
.
length_of_protocol_id_contents
),
protocol_id_contents
(
p
.
protocol_id_contents
)
{}
protocol_or_container_id
&
operator
=
(
protocol_or_container_id
other
)
{
std
::
swap
(
protocol_id
,
other
.
protocol_id
);
std
::
swap
(
length_of_protocol_id_contents
,
other
.
length_of_protocol_id_contents
);
std
::
swap
(
protocol_id_contents
,
other
.
protocol_id_contents
);
return
*
this
;
}
//--------
void
dump_to
(
std
::
ostream
&
os
)
{
auto
ns_protocol_id
=
htons
(
protocol_id
);
...
...
@@ -2348,6 +2381,20 @@ gtpv2c_ie(GTP_IE_SERVING_NETWORK){
u3
.
b
=
0
;
};
//--------
explicit
gtpv2c_serving_network_ie
(
const
gtpv2c_serving_network_ie
&
i
)
:
gtpv2c_ie
(
i
),
u1
(
i
.
u1
),
u2
(
i
.
u2
),
u3
(
i
.
u3
)
{}
//--------
gtpv2c_serving_network_ie
&
operator
=
(
gtpv2c_serving_network_ie
other
)
{
this
->
gtpv2c_ie
::
operator
=
(
other
);
std
::
swap
(
u1
,
other
.
u1
);
std
::
swap
(
u2
,
other
.
u2
);
std
::
swap
(
u3
,
other
.
u3
);
return
*
this
;
}
//--------
void
to_core_type
(
core
::
serving_network_t
&
s
)
{
s
.
mcc_digit_2
=
u1
.
bf
.
mcc_digit_2
;
s
.
mcc_digit_1
=
u1
.
bf
.
mcc_digit_1
;
...
...
@@ -3118,6 +3165,32 @@ gtpv2c_ie(GTP_IE_USER_LOCATION_INFORMATION){
macro_enodeb_id
=
gtpv2c_macro_enodeb_id_field_ie
();
extended_macro_enodeb_id
=
gtpv2c_extended_macro_enodeb_id_field_ie
();
};
explicit
gtpv2c_user_location_information_ie
(
const
gtpv2c_user_location_information_ie
&
i
)
:
gtpv2c_ie
(
i
),
u1
(
i
.
u1
),
cgi
(
i
.
cgi
),
sai
(
i
.
sai
),
rai
(
i
.
rai
),
tai
(
i
.
tai
),
ecgi
(
i
.
ecgi
),
lai
(
i
.
lai
),
macro_enodeb_id
(
i
.
macro_enodeb_id
),
extended_macro_enodeb_id
(
i
.
extended_macro_enodeb_id
)
{}
//--------
gtpv2c_user_location_information_ie
&
operator
=
(
gtpv2c_user_location_information_ie
other
)
{
this
->
gtpv2c_ie
::
operator
=
(
other
);
std
::
swap
(
u1
,
other
.
u1
);
std
::
swap
(
cgi
,
other
.
cgi
);
std
::
swap
(
sai
,
other
.
sai
);
std
::
swap
(
rai
,
other
.
rai
);
std
::
swap
(
tai
,
other
.
tai
);
std
::
swap
(
ecgi
,
other
.
ecgi
);
std
::
swap
(
lai
,
other
.
lai
);
std
::
swap
(
macro_enodeb_id
,
other
.
macro_enodeb_id
);
std
::
swap
(
extended_macro_enodeb_id
,
other
.
extended_macro_enodeb_id
);
return
*
this
;
}
//--------
void
to_core_type
(
core
::
uli_t
&
u
)
{
u
=
{
0
};
...
...
@@ -3270,6 +3343,16 @@ gtpv2c_ie(GTP_IE_FULLY_QUALIFIED_TUNNEL_ENDPOINT_IDENTIFIER){
ipv6_address
=
in6addr_any
;
};
//--------
gtpv2c_fully_qualified_teid_ie
&
operator
=
(
gtpv2c_fully_qualified_teid_ie
other
)
{
this
->
gtpv2c_ie
::
operator
=
(
other
);
std
::
swap
(
u1
,
other
.
u1
);
std
::
swap
(
teid_gre_key
,
other
.
teid_gre_key
);
std
::
swap
(
ipv4_address
,
other
.
ipv4_address
);
std
::
swap
(
ipv6_address
,
other
.
ipv6_address
);
return
*
this
;
}
//--------
void
to_core_type
(
core
::
fteid_t
&
f
)
{
f
=
{
0
};
f
.
v4
=
u1
.
bf
.
v4
;
...
...
@@ -3340,6 +3423,13 @@ gtpv2c_ie(GTP_IE_DELAY_VALUE){
delay_value
=
0
;
};
//--------
gtpv2c_delay_value_ie
&
operator
=
(
gtpv2c_delay_value_ie
other
)
{
this
->
gtpv2c_ie
::
operator
=
(
other
);
std
::
swap
(
delay_value
,
other
.
delay_value
);
return
*
this
;
}
//--------
void
to_core_type
(
core
::
delay_value_t
&
d
)
{
d
=
{
0
};
d
.
delay_value
=
delay_value
;
...
...
@@ -3399,6 +3489,14 @@ gtpv2c_ie(GTP_IE_UE_TIME_ZONE){
u1
.
b
=
0
;
};
//--------
gtpv2c_ue_time_zone_ie
&
operator
=
(
gtpv2c_ue_time_zone_ie
other
)
{
this
->
gtpv2c_ie
::
operator
=
(
other
);
std
::
swap
(
u1
,
other
.
u1
);
std
::
swap
(
time_zone
,
other
.
time_zone
);
return
*
this
;
}
//--------
void
to_core_type
(
core
::
ue_time_zone_t
&
t
)
{
t
=
{
0
};
t
.
time_zone
=
time_zone
;
...
...
@@ -3449,6 +3547,13 @@ gtpv2c_ie(GTP_IE_APN_RESTRICTION){
restriction_type_value
=
0
;
};
//--------
gtpv2c_apn_restriction_ie
&
operator
=
(
gtpv2c_apn_restriction_ie
other
)
{
this
->
gtpv2c_ie
::
operator
=
(
other
);
std
::
swap
(
restriction_type_value
,
other
.
restriction_type_value
);
return
*
this
;
}
//--------
void
to_core_type
(
core
::
access_point_name_restriction_t
&
a
)
{
a
=
{
0
};
a
.
restriction_type_value
=
restriction_type_value
;
...
...
@@ -3502,6 +3607,13 @@ gtpv2c_ie(GTP_IE_SELECTION_MODE){
u1
.
b
=
0
;
};
//--------
gtpv2c_selection_mode_ie
&
operator
=
(
gtpv2c_selection_mode_ie
other
)
{
this
->
gtpv2c_ie
::
operator
=
(
other
);
std
::
swap
(
u1
,
other
.
u1
);
return
*
this
;
}
//--------
void
to_core_type
(
core
::
selection_mode_t
&
s
)
{
s
=
{
0
};
s
.
selec_mode
=
u1
.
bf
.
selec_mode
;
...
...
@@ -3591,6 +3703,15 @@ public:
pdn_connection_set_identifier
.
reserve
(
PDN_CONNECTION_SET_IDENTIFIER_MAX
);
};
//--------
gtpv2c_fq_csid_ie
&
operator
=
(
gtpv2c_fq_csid_ie
other
)
{
this
->
gtpv2c_ie
::
operator
=
(
other
);
std
::
swap
(
u1
,
other
.
u1
);
std
::
swap
(
u2
,
other
.
u2
);
std
::
swap
(
pdn_connection_set_identifier
,
other
.
pdn_connection_set_identifier
);
return
*
this
;
}
//--------
void
to_core_type
(
core
::
fq_csid_t
&
f
)
{
f
=
{
0
};
f
.
fq_csid_ie_hdr
.
node_id_type
=
u1
.
bf
.
node_id_type
;
...
...
@@ -3709,6 +3830,13 @@ public:
node_type
=
0
;
};
//--------
gtpv2c_node_type_ie
&
operator
=
(
gtpv2c_node_type_ie
other
)
{
this
->
gtpv2c_ie
::
operator
=
(
other
);
std
::
swap
(
node_type
,
other
.
node_type
);
return
*
this
;
}
//--------
void
to_core_type
(
core
::
node_type_t
&
n
)
{
n
=
{
0
};
n
.
node_type
=
node_type
;
...
...
@@ -3770,6 +3898,13 @@ public:
u1
.
b
=
0
;
};
//--------
gtpv2c_node_features_ie
&
operator
=
(
gtpv2c_node_features_ie
other
)
{
this
->
gtpv2c_ie
::
operator
=
(
other
);
std
::
swap
(
u1
,
other
.
u1
);
return
*
this
;
}
//--------
void
to_core_type
(
core
::
node_features_t
&
s
)
{
s
=
{
0
};
s
.
prn
=
u1
.
bf
.
prn
;
...
...
@@ -3864,6 +3999,14 @@ gtpv2c_ie(GTP_IE_RAN_NAS_CAUSE){
explicit
gtpv2c_ran_nas_cause_ie
(
const
gtpv2c_tlv
&
t
)
:
gtpv2c_ie
(
t
),
u1
(),
cause_value
()
{}
gtpv2c_ran_nas_cause_ie
&
operator
=
(
gtpv2c_ran_nas_cause_ie
other
)
{
this
->
gtpv2c_ie
::
operator
=
(
other
);
std
::
swap
(
u1
,
other
.
u1
);
std
::
swap
(
cause_value
,
other
.
cause_value
);
return
*
this
;
}
//--------
void
to_core_type
(
core
::
ran_nas_cause_t
&
c
)
{
c
=
{
0
};
...
...
@@ -3990,6 +4133,13 @@ gtpv2c_ie(GTP_IE_CIOT_OPTIMIZATIONS_SUPPORT_INDICATION){
u1
.
b
=
0
;
};
//--------
gtpv2c_ciot_optimizations_support_indication_ie
&
operator
=
(
gtpv2c_ciot_optimizations_support_indication_ie
other
)
{
this
->
gtpv2c_ie
::
operator
=
(
other
);
std
::
swap
(
u1
,
other
.
u1
);
return
*
this
;
}
//--------
void
to_core_type
(
core
::
ciot_optimizations_support_indication_t
&
s
)
{
s
=
{
0
};
s
.
ihcsi
=
u1
.
bf
.
ihcsi
;
...
...
@@ -4037,6 +4187,13 @@ public:
explicit
gtpv2c_epco_ie
(
const
gtpv2c_tlv
&
t
)
:
gtpv2c_ie
(
t
)
{
};
//--------
gtpv2c_epco_ie
&
operator
=
(
gtpv2c_epco_ie
other
)
{
this
->
gtpv2c_ie
::
operator
=
(
other
);
std
::
swap
(
extended_protocol_configuration_options
,
other
.
extended_protocol_configuration_options
);
return
*
this
;
}
//--------
void
to_core_type
(
core
::
extended_protocol_configuration_options_t
&
e
)
{
e
.
extended_protocol_configuration_options
=
extended_protocol_configuration_options
;
}
...
...
src/gtpv2c/msg_gtpv2c.hpp
View file @
149aa8b6
...
...
@@ -356,6 +356,22 @@ public:
{
for
(
int
i
=
0
;
i
<
BEARER_CONTEXT_MAX_FTEID_INSTANCES
;
i
++
)
fteid
[
i
]
=
b
.
fteid
[
i
];
}
bearer_context
&
operator
=
(
bearer_context
other
)
{
std
::
swap
(
eps_bearer_id
,
other
.
eps_bearer_id
);
std
::
swap
(
tft
,
other
.
tft
);
std
::
swap
(
bearer_level_qos
,
other
.
bearer_level_qos
);
std
::
swap
(
cause
,
other
.
cause
);
std
::
swap
(
charging_id
,
other
.
charging_id
);
std
::
swap
(
bearer_flags
,
other
.
bearer_flags
);
std
::
swap
(
pco
,
other
.
pco
);
std
::
swap
(
epco
,
other
.
epco
);
std
::
swap
(
ran_nas_cause
,
other
.
ran_nas_cause
);
for
(
int
i
=
0
;
i
<
BEARER_CONTEXT_MAX_FTEID_INSTANCES
;
i
++
)
std
::
swap
(
fteid
[
i
],
other
.
fteid
[
i
]);
return
*
this
;
}
//virtual ~bearer_context() {};
virtual
void
set
(
const
core
::
ebi_t
&
v
,
const
uint8_t
instance
=
0
)
{
eps_bearer_id
.
first
=
true
;
eps_bearer_id
.
second
=
v
;}
virtual
void
set
(
const
core
::
traffic_flow_template_t
&
v
,
const
uint8_t
instance
=
0
)
{
tft
.
first
=
true
;
tft
.
second
=
v
;}
...
...
@@ -1389,9 +1405,9 @@ public:
///< interfaces.
gtpv2c_create_session_response
()
:
cause
(),
sender_fteid_for_cp
(),
pgw_back_off_time
(),
indication_flags
(),
sender_fteid_for_cp
(),
s5_s8_pgw_fteid
(),
paa
(),
apn_restriction
(),
...
...
@@ -1406,9 +1422,9 @@ public:
pgw_ldn
()
{}
gtpv2c_create_session_response
(
const
gtpv2c_create_session_response
&
i
)
:
cause
(
i
.
cause
),
sender_fteid_for_cp
(
i
.
sender_fteid_for_cp
),
pgw_back_off_time
(
i
.
pgw_back_off_time
),
indication_flags
(
i
.
indication_flags
),
sender_fteid_for_cp
(
i
.
sender_fteid_for_cp
),
s5_s8_pgw_fteid
(
i
.
s5_s8_pgw_fteid
),
paa
(
i
.
paa
),
apn_restriction
(
i
.
apn_restriction
),
...
...
@@ -1422,6 +1438,27 @@ public:
sgw_ldn
(
i
.
sgw_ldn
),
pgw_ldn
(
i
.
pgw_ldn
)
{}
gtpv2c_create_session_response
&
operator
=
(
gtpv2c_create_session_response
other
)
{
std
::
swap
(
cause
,
other
.
cause
);
std
::
swap
(
pgw_back_off_time
,
other
.
pgw_back_off_time
);
std
::
swap
(
indication_flags
,
other
.
indication_flags
);
std
::
swap
(
sender_fteid_for_cp
,
other
.
sender_fteid_for_cp
);
std
::
swap
(
s5_s8_pgw_fteid
,
other
.
s5_s8_pgw_fteid
);
std
::
swap
(
paa
,
other
.
paa
);
std
::
swap
(
apn_restriction
,
other
.
apn_restriction
);
std
::
swap
(
apn_ambr
,
other
.
apn_ambr
);
std
::
swap
(
linked_eps_bearer_id
,
other
.
linked_eps_bearer_id
);
std
::
swap
(
pco
,
other
.
pco
);
std
::
swap
(
bearer_contexts_created
,
other
.
bearer_contexts_created
);
std
::
swap
(
bearer_contexts_marked_for_removal
,
other
.
bearer_contexts_marked_for_removal
);
std
::
swap
(
pgw_fq_csid
,
other
.
pgw_fq_csid
);
std
::
swap
(
sgw_fq_csid
,
other
.
sgw_fq_csid
);
std
::
swap
(
sgw_ldn
,
other
.
sgw_ldn
);
std
::
swap
(
pgw_ldn
,
other
.
pgw_ldn
);
return
*
this
;
}
static
const
char
*
get_msg_name
()
{
return
"CREATE_SESSION_RESPONSE"
;};
bool
get
(
core
::
cause_t
&
v
,
const
uint8_t
instance
=
0
)
const
{
if
(
cause
.
first
)
{
v
=
cause
.
second
;
return
true
;}
return
false
;}
...
...
@@ -1565,6 +1602,12 @@ public:
gtpv2c_echo_request
()
:
recovery_restart_counter
(),
sending_node_features
()
{}
gtpv2c_echo_request
(
const
gtpv2c_echo_request
&
i
)
:
recovery_restart_counter
(
i
.
recovery_restart_counter
),
sending_node_features
(
i
.
sending_node_features
)
{}
gtpv2c_echo_request
&
operator
=
(
gtpv2c_echo_request
other
)
{
std
::
swap
(
recovery_restart_counter
,
other
.
recovery_restart_counter
);
std
::
swap
(
sending_node_features
,
other
.
sending_node_features
);
return
*
this
;
}
static
const
char
*
get_msg_name
()
{
return
"ECHO_REQUEST"
;};
bool
get
(
core
::
recovery_t
&
v
)
const
{
if
(
recovery_restart_counter
.
first
)
{
v
=
recovery_restart_counter
.
second
;
return
true
;}
return
false
;}
...
...
@@ -1589,6 +1632,12 @@ public:
recovery_restart_counter
(
i
.
recovery_restart_counter
),
sending_node_features
(
i
.
sending_node_features
)
{}
gtpv2c_echo_response
&
operator
=
(
gtpv2c_echo_response
other
)
{
std
::
swap
(
recovery_restart_counter
,
other
.
recovery_restart_counter
);
std
::
swap
(
sending_node_features
,
other
.
sending_node_features
);
return
*
this
;
}
static
const
char
*
get_msg_name
()
{
return
"ECHO_RESPONSE"
;};
bool
get
(
core
::
recovery_t
&
v
)
const
{
if
(
recovery_restart_counter
.
first
)
{
v
=
recovery_restart_counter
.
second
;
return
true
;}
return
false
;}
...
...
@@ -1725,6 +1774,19 @@ public:
sgw_fq_csid
(
i
.
sgw_fq_csid
),
indication_flags
(
i
.
indication_flags
)
{}
gtpv2c_create_bearer_request
&
operator
=
(
gtpv2c_create_bearer_request
other
)
{
std
::
swap
(
ie_presence_mask
,
other
.
ie_presence_mask
);
std
::
swap
(
pti
,
other
.
pti
);
std
::
swap
(
linked_eps_bearer_id
,
other
.
linked_eps_bearer_id
);
std
::
swap
(
pco
,
other
.
pco
);
std
::
swap
(
bearer_contexts
,
other
.
bearer_contexts
);
std
::
swap
(
pgw_fq_csid
,
other
.
pgw_fq_csid
);
std
::
swap
(
sgw_fq_csid
,
other
.
sgw_fq_csid
);
std
::
swap
(
indication_flags
,
other
.
indication_flags
);
return
*
this
;
}
static
const
char
*
get_msg_name
()
{
return
"CREATE_BEARER_REQUEST"
;};
#define GTPV2C_CREATE_BEARER_REQUEST_PR_IE_PROCEDURE_TRANSACTION_IDENTIFIER ((uint64_t)1)
...
...
@@ -1983,6 +2045,21 @@ public:
ue_time_zone
(
i
.
ue_time_zone
),
uli
(
i
.
uli
)
{}
gtpv2c_create_bearer_response
&
operator
=
(
gtpv2c_create_bearer_response
other
)
{
std
::
swap
(
ie_presence_mask
,
other
.
ie_presence_mask
);
std
::
swap
(
cause
,
other
.
cause
);
std
::
swap
(
bearer_contexts
,
other
.
bearer_contexts
);
std
::
swap
(
mme_fq_csid
,
other
.
mme_fq_csid
);
std
::
swap
(
sgw_fq_csid
,
other
.
sgw_fq_csid
);
std
::
swap
(
epdg_fq_csid
,
other
.
epdg_fq_csid
);
std
::
swap
(
twan_fq_csid
,
other
.
twan_fq_csid
);
std
::
swap
(
pco
,
other
.
pco
);
std
::
swap
(
ue_time_zone
,
other
.
ue_time_zone
);
std
::
swap
(
uli
,
other
.
uli
);
return
*
this
;
}
static
const
char
*
get_msg_name
()
{
return
"CREATE_BEARER_RESPONSE"
;};
#define GTPV2C_CREATE_BEARER_RESPONSE_PR_IE_CAUSE ((uint64_t)1)
...
...
@@ -2214,6 +2291,28 @@ public:
uci
(
i
.
uci
),
imsi
(
i
.
imsi
)
{}
gtpv2c_modify_bearer_request
&
operator
=
(
gtpv2c_modify_bearer_request
other
)
{
std
::
swap
(
ie_presence_mask
,
other
.
ie_presence_mask
);
std
::
swap
(
mei
,
other
.
mei
);
std
::
swap
(
uli
,
other
.
uli
);
std
::
swap
(
serving_network
,
other
.
serving_network
);
std
::
swap
(
rat_type
,
other
.
rat_type
);
std
::
swap
(
rat_type
,
other
.
rat_type
);
std
::
swap
(
indication_flags
,
other
.
indication_flags
);
std
::
swap
(
sender_fteid_for_cp
,
other
.
sender_fteid_for_cp
);
std
::
swap
(
apn_ambr
,
other
.
apn_ambr
);
std
::
swap
(
delay_dl_packet_notif_req
,
other
.
delay_dl_packet_notif_req
);
std
::
swap
(
bearer_contexts_to_be_modified
,
other
.
bearer_contexts_to_be_modified
);
std
::
swap
(
bearer_contexts_to_be_removed
,
other
.
bearer_contexts_to_be_removed
);
std
::
swap
(
ue_time_zone
,
other
.
ue_time_zone
);
std
::
swap
(
mme_fq_csid
,
other
.
mme_fq_csid
);
std
::
swap
(
sgw_fq_csid
,
other
.
sgw_fq_csid
);
std
::
swap
(
uci
,
other
.
uci
);
std
::
swap
(
imsi
,
other
.
imsi
);
return
*
this
;
}
static
const
char
*
get_msg_name
()
{
return
"MODIFY_BEARER_REQUEST"
;};
#define GTPV2C_MODIFY_BEARER_REQUEST_PR_IE_MEI ((uint64_t)1)
...
...
@@ -2524,7 +2623,7 @@ public:
}
;
//-----------------------------------------------------------------------------
/** @class
gtpv2c
_modify_bearer_response
/** @class
bearer_context_modified_within
_modify_bearer_response
* @brief Modify Bearer Response
*
* The Modify Bearer Response will be sent on S11 interface as
...
...
@@ -2580,6 +2679,29 @@ public:
if
(
b
.
get
(
s4_u_sgw_fteid
.
second
,
2
))
s4_u_sgw_fteid
.
first
=
true
;
if
(
b
.
get
(
s11_u_sgw_fteid
.
second
,
3
))
s11_u_sgw_fteid
.
first
=
true
;
}
// explicit bearer_context_modified_within_modify_bearer_response(const bearer_context_modified_within_modify_bearer_response& b) :
// eps_bearer_id(b.eps_bearer_id),
// cause(b.cause),
// s1_u_sgw_fteid(b.s1_u_sgw_fteid),
// s12_sgw_fteid(b.s12_sgw_fteid),
// s4_u_sgw_fteid(b.s4_u_sgw_fteid),
// charging_id(b.charging_id),
// bearer_flags(b.bearer_flags),
// s11_u_sgw_fteid(b.s11_u_sgw_fteid) {}
//
// bearer_context_modified_within_modify_bearer_response& operator=(bearer_context_modified_within_modify_bearer_response other)
// {
// std::swap(eps_bearer_id, other.eps_bearer_id);
// std::swap(cause, other.cause);
// std::swap(s1_u_sgw_fteid, other.s1_u_sgw_fteid);
// std::swap(s12_sgw_fteid, other.s12_sgw_fteid);
// std::swap(s4_u_sgw_fteid, other.s4_u_sgw_fteid);
// std::swap(charging_id, other.charging_id);
// std::swap(bearer_flags, other.bearer_flags);
// std::swap(s11_u_sgw_fteid, other.s11_u_sgw_fteid);
// return *this;
// }
};
class
bearer_context_marked_for_removal_within_modify_bearer_response
{
...
...
@@ -2600,6 +2722,18 @@ public:
explicit
bearer_context_marked_for_removal_within_modify_bearer_response
(
const
bearer_context
&
b
)
:
eps_bearer_id
(
b
.
eps_bearer_id
),
cause
(
b
.
cause
)
{}
// explicit bearer_context_marked_for_removal_within_modify_bearer_response(const bearer_context_marked_for_removal_within_modify_bearer_response& b) :
// eps_bearer_id(b.eps_bearer_id),
// cause(b.cause) {}
// bearer_context_marked_for_removal_within_modify_bearer_response& operator=(bearer_context_marked_for_removal_within_modify_bearer_response other)
// {
// std::swap(eps_bearer_id, other.eps_bearer_id);
// std::swap(cause, other.cause);
// return *this;
// }
};
class
gtpv2c_modify_bearer_response
:
public
gtpv2c_ies_container
{
...
...
@@ -2630,6 +2764,22 @@ public:
indication_flags
(
i
.
indication_flags
),
pdn_connection_charging_id
(
i
.
pdn_connection_charging_id
)
{}
gtpv2c_modify_bearer_response
&
operator
=
(
gtpv2c_modify_bearer_response
other
)
{
std
::
swap
(
cause
,
other
.
cause
);
std
::
swap
(
msisdn
,
other
.
msisdn
);
std
::
swap
(
linked_eps_bearer_id
,
other
.
linked_eps_bearer_id
);
std
::
swap
(
apn_restriction
,
other
.
apn_restriction
);
std
::
swap
(
pco
,
other
.
pco
);
std
::
swap
(
bearer_contexts_modified
,
other
.
bearer_contexts_modified
);
std
::
swap
(
bearer_contexts_marked_for_removal
,
other
.
bearer_contexts_marked_for_removal
);
std
::
swap
(
pgw_fq_csid
,
other
.
pgw_fq_csid
);
std
::
swap
(
sgw_fq_csid
,
other
.
sgw_fq_csid
);
std
::
swap
(
indication_flags
,
other
.
indication_flags
);
std
::
swap
(
pdn_connection_charging_id
,
other
.
pdn_connection_charging_id
);
return
*
this
;
}
static
const
char
*
get_msg_name
()
{
return
"MODIFY_BEARER_RESPONSE"
;};
static
const
uint8_t
msg_id
=
GTP_MODIFY_BEARER_RESPONSE
;
...
...
@@ -2818,6 +2968,22 @@ public:
ran_nas_release_cause
(
i
.
ran_nas_release_cause
),
epco
(
i
.
epco
)
{}
gtpv2c_delete_session_request
&
operator
=
(
gtpv2c_delete_session_request
other
)
{
std
::
swap
(
ie_presence_mask
,
other
.
ie_presence_mask
);
std
::
swap
(
cause
,
other
.
cause
);
std
::
swap
(
linked_eps_bearer_id
,
other
.
linked_eps_bearer_id
);
std
::
swap
(
uli
,
other
.
uli
);
std
::
swap
(
indication_flags
,
other
.
indication_flags
);
std
::
swap
(
pco
,
other
.
pco
);
std
::
swap
(
originating_node
,
other
.
originating_node
);
std
::
swap
(
sender_fteid_for_cp
,
other
.
sender_fteid_for_cp
);
std
::
swap
(
ue_time_zone
,
other
.
ue_time_zone
);
std
::
swap
(
ran_nas_release_cause
,
other
.
ran_nas_release_cause
);
std
::
swap
(
epco
,
other
.
epco
);
return
*
this
;
}
static
const
char
*
get_msg_name
()
{
return
"DELETE_SESSION_REQUEST"
;};
#define GTPV2C_DELETE_SESSION_REQUEST_PR_IE_CAUSE ((uint64_t)1)
...
...
@@ -2912,6 +3078,16 @@ public:
indication_flags
(
i
.
indication_flags
),
epco
(
i
.
epco
)
{}
gtpv2c_delete_session_response
&
operator
=
(
gtpv2c_delete_session_response
other
)
{
std
::
swap
(
ie_presence_mask
,
other
.
ie_presence_mask
);
std
::
swap
(
cause
,
other
.
cause
);
std
::
swap
(
pco
,
other
.
pco
);
std
::
swap
(
indication_flags
,
other
.
indication_flags
);
std
::
swap
(
epco
,
other
.
epco
);
return
*
this
;
}
static
const
char
*
get_msg_name
()
{
return
"DELETE_SESSION_RESPONSE"
;};
#define GTPV2C_DELETE_SESSION_RESPONSE_PR_IE_CAUSE ((uint64_t)1)
...
...
@@ -2980,6 +3156,13 @@ public:
originating_node
(
i
.
originating_node
),
indication_flags
(
i
.
indication_flags
)
{}
gtpv2c_release_access_bearers_request
&
operator
=
(
gtpv2c_release_access_bearers_request
other
)
{
std
::
swap
(
originating_node
,
other
.
originating_node
);
std
::
swap
(
indication_flags
,
other
.
indication_flags
);
return
*
this
;
}
static
const
char
*
get_msg_name
()
{
return
"RELEASE_ACCESS_BEARERS_REQUEST"
;};
static
const
uint8_t
msg_id
=
GTP_RELEASE_ACCESS_BEARERS_REQUEST
;
...
...
@@ -3023,6 +3206,13 @@ public:
cause
(
i
.
cause
),
indication_flags
(
i
.
indication_flags
)
{}
gtpv2c_release_access_bearers_response
&
operator
=
(
gtpv2c_release_access_bearers_response
other
)
{
std
::
swap
(
cause
,
other
.
cause
);
std
::
swap
(
indication_flags
,
other
.
indication_flags
);
return
*
this
;
}
static
const
char
*
get_msg_name
()
{
return
"RELEASE_ACCESS_BEARERS_RESPONSE"
;};
std
::
pair
<
bool
,
core
::
cause_t
>
cause
;
...
...
@@ -3064,6 +3254,7 @@ public:
void
set
(
const
core
::
ran_nas_cause_t
&
v
,
const
uint8_t
instance
=
0
)
{
ran_nas_release_cause
=
v
;
ie_presence_mask
|=
GTPV2C_BEARER_CONTEXT_WITHIN_DELETE_BEARER_COMMAND_PR_IE_RAN_NAS_RELEASE_CAUSE
;}
bearer_context_within_delete_bearer_command
()
:
ie_presence_mask
(
0
),
eps_bearer_id
(),
bearer_flags
(),
ran_nas_release_cause
()
{}
...
...
@@ -3074,6 +3265,21 @@ public:
if
(
b
.
get
(
bearer_flags
,
0
))
ie_presence_mask
|=
GTPV2C_BEARER_CONTEXT_WITHIN_DELETE_BEARER_COMMAND_PR_IE_BEARER_FLAGS
;
if
(
b
.
get
(
ran_nas_release_cause
,
0
))
ie_presence_mask
|=
GTPV2C_BEARER_CONTEXT_WITHIN_DELETE_BEARER_COMMAND_PR_IE_RAN_NAS_RELEASE_CAUSE
;
}
explicit
bearer_context_within_delete_bearer_command
(
const
bearer_context_within_delete_bearer_command
&
b
)
:
ie_presence_mask
(
b
.
ie_presence_mask
),
eps_bearer_id
(
b
.
eps_bearer_id
),
bearer_flags
(
b
.
bearer_flags
),
ran_nas_release_cause
(
b
.
ran_nas_release_cause
)
{}
bearer_context_within_delete_bearer_command
&
operator
=
(
bearer_context_within_delete_bearer_command
other
)
{
std
::
swap
(
ie_presence_mask
,
other
.
ie_presence_mask
);
std
::
swap
(
eps_bearer_id
,
other
.
eps_bearer_id
);
std
::
swap
(
bearer_flags
,
other
.
bearer_flags
);
std
::
swap
(
ran_nas_release_cause
,
other
.
ran_nas_release_cause
);
return
*
this
;
}
};
class
gtpv2c_delete_bearer_command
:
public
gtpv2c_ies_container
{
...
...
@@ -3085,12 +3291,23 @@ public:
ue_time_zone
=
{};
sender_fteid_for_cp
=
{};
}
gtpv2c_delete_bearer_command
(
const
gtpv2c_delete_bearer_command
&
i
)
:
bearer_contexts
(
i
.
bearer_contexts
)
{
ie_presence_mask
=
i
.
ie_presence_mask
;
uli
=
i
.
uli
;
uli_timestamp
=
i
.
uli_timestamp
;
ue_time_zone
=
i
.
ue_time_zone
;
sender_fteid_for_cp
=
i
.
sender_fteid_for_cp
;
gtpv2c_delete_bearer_command
(
const
gtpv2c_delete_bearer_command
&
i
)
:
ie_presence_mask
(
i
.
ie_presence_mask
),
bearer_contexts
(
i
.
bearer_contexts
),
uli
(
i
.
uli
),
uli_timestamp
(
i
.
uli_timestamp
),
ue_time_zone
(
i
.
ue_time_zone
),
sender_fteid_for_cp
(
i
.
sender_fteid_for_cp
)
{}
gtpv2c_delete_bearer_command
&
operator
=
(
gtpv2c_delete_bearer_command
other
)
{
std
::
swap
(
ie_presence_mask
,
other
.
ie_presence_mask
);
std
::
swap
(
bearer_contexts
,
other
.
bearer_contexts
);
std
::
swap
(
uli
,
other
.
uli
);
std
::
swap
(
uli_timestamp
,
other
.
uli_timestamp
);
std
::
swap
(
ue_time_zone
,
other
.
ue_time_zone
);
std
::
swap
(
sender_fteid_for_cp
,
other
.
sender_fteid_for_cp
);
return
*
this
;
}
static
const
char
*
get_msg_name
()
{
return
"DELETE_BEARER_COMMAND"
;};
...
...
@@ -3133,7 +3350,7 @@ public:
};
//-----------------------------------------------------------------------------
/** @class
gtpv2c
_delete_bearer_failure_indication
/** @class
bearer_context_within
_delete_bearer_failure_indication
*/
class
bearer_context_within_delete_bearer_failure_indication
{
public:
...
...
@@ -3158,7 +3375,23 @@ public:
if
(
b
.
get
(
eps_bearer_id
,
0
))
ie_presence_mask
|=
GTPV2C_BEARER_CONTEXT_WITHIN_DELETE_BEARER_FAILURE_INDICATION_PR_IE_EPS_BEARER_ID
;
if
(
b
.
get
(
cause
,
0
))
ie_presence_mask
|=
GTPV2C_BEARER_CONTEXT_WITHIN_DELETE_BEARER_FAILURE_INDICATION_PR_IE_CAUSE
;
}
explicit
bearer_context_within_delete_bearer_failure_indication
(
const
bearer_context_within_delete_bearer_failure_indication
&
b
)
:
ie_presence_mask
(
b
.
ie_presence_mask
),
eps_bearer_id
(
b
.
eps_bearer_id
),
cause
(
b
.
cause
)
{}
bearer_context_within_delete_bearer_failure_indication
&
operator
=
(
bearer_context_within_delete_bearer_failure_indication
other
)
{
std
::
swap
(
ie_presence_mask
,
other
.
ie_presence_mask
);
std
::
swap
(
eps_bearer_id
,
other
.
eps_bearer_id
);
std
::
swap
(
cause
,
other
.
cause
);
return
*
this
;
}
};
//-----------------------------------------------------------------------------
/** @class gtpv2c_delete_bearer_failure_indication
*/
class
gtpv2c_delete_bearer_failure_indication
:
public
gtpv2c_ies_container
{
public:
gtpv2c_delete_bearer_failure_indication
()
:
bearer_contexts
()
{
...
...
@@ -3166,11 +3399,21 @@ public:
cause
=
{};
indication_flags
=
{};
}
gtpv2c_delete_bearer_failure_indication
(
const
gtpv2c_delete_bearer_failure_indication
&
i
)
:
bearer_contexts
(
i
.
bearer_contexts
)
{
ie_presence_mask
=
i
.
ie_presence_mask
;
cause
=
i
.
cause
;
indication_flags
=
i
.
indication_flags
;
explicit
gtpv2c_delete_bearer_failure_indication
(
const
gtpv2c_delete_bearer_failure_indication
&
i
)
:
ie_presence_mask
(
i
.
ie_presence_mask
),
bearer_contexts
(
i
.
bearer_contexts
),
cause
(
i
.
cause
),
indication_flags
(
i
.
indication_flags
)
{}
gtpv2c_delete_bearer_failure_indication
&
operator
=
(
gtpv2c_delete_bearer_failure_indication
other
)
{
std
::
swap
(
ie_presence_mask
,
other
.
ie_presence_mask
);
std
::
swap
(
bearer_contexts
,
other
.
bearer_contexts
);
std
::
swap
(
cause
,
other
.
cause
);
std
::
swap
(
indication_flags
,
other
.
indication_flags
);
return
*
this
;
}
static
const
char
*
get_msg_name
()
{
return
"DELETE_BEARER_FAILURE_INDICATION"
;};
static
const
uint8_t
msg_id
=
GTP_DELETE_BEARER_FAILURE_INDICATION
;
...
...
@@ -3224,14 +3467,25 @@ public:
sender_fteid_for_cp
=
{};
indication_flags
=
{};
}
gtpv2c_downlink_data_notification
(
const
gtpv2c_downlink_data_notification
&
i
)
{
ie_presence_mask
=
i
.
ie_presence_mask
;
cause
=
i
.
cause
;
eps_bearer_id
=
i
.
eps_bearer_id
;
arp
=
i
.
arp
;
imsi
=
i
.
imsi
;
sender_fteid_for_cp
=
i
.
sender_fteid_for_cp
;
indication_flags
=
i
.
indication_flags
;
gtpv2c_downlink_data_notification
(
const
gtpv2c_downlink_data_notification
&
i
)
:
ie_presence_mask
(
i
.
ie_presence_mask
),
cause
(
i
.
cause
),
eps_bearer_id
(
i
.
eps_bearer_id
),
arp
(
i
.
arp
),
imsi
(
i
.
imsi
),
sender_fteid_for_cp
(
i
.
sender_fteid_for_cp
),
indication_flags
(
i
.
indication_flags
)
{}
gtpv2c_downlink_data_notification
&
operator
=
(
gtpv2c_downlink_data_notification
other
)
{
std
::
swap
(
ie_presence_mask
,
other
.
ie_presence_mask
);
std
::
swap
(
cause
,
other
.
cause
);
std
::
swap
(
eps_bearer_id
,
other
.
eps_bearer_id
);
std
::
swap
(
arp
,
other
.
arp
);
std
::
swap
(
imsi
,
other
.
imsi
);
std
::
swap
(
sender_fteid_for_cp
,
other
.
sender_fteid_for_cp
);
std
::
swap
(
indication_flags
,
other
.
indication_flags
);
return
*
this
;
}
static
const
char
*
get_msg_name
()
{
return
"DOWNLINK_DATA_NOTIFICATION"
;};
...
...
@@ -3277,11 +3531,19 @@ public:
cause
=
{};
imsi
=
{};
}
gtpv2c_downlink_data_notification_acknowledge
(
const
gtpv2c_downlink_data_notification_acknowledge
&
i
)
{
ie_presence_mask
=
i
.
ie_presence_mask
;
cause
=
i
.
cause
;
imsi
=
i
.
imsi
;
gtpv2c_downlink_data_notification_acknowledge
(
const
gtpv2c_downlink_data_notification_acknowledge
&
i
)
:
ie_presence_mask
(
i
.
ie_presence_mask
),
cause
(
i
.
cause
),
imsi
(
i
.
imsi
)
{}
gtpv2c_downlink_data_notification_acknowledge
&
operator
=
(
gtpv2c_downlink_data_notification_acknowledge
other
)
{
std
::
swap
(
ie_presence_mask
,
other
.
ie_presence_mask
);
std
::
swap
(
cause
,
other
.
cause
);
std
::
swap
(
imsi
,
other
.
imsi
);
return
*
this
;
}
static
const
char
*
get_msg_name
()
{
return
"DOWNLINK_DATA_NOTIFICATION_ACKNOWLEDGE"
;};
#define DOWNLINK_DATA_NOTIFICATION_ACK_PR_IE_CAUSE ((uint64_t)1)
...
...
@@ -3327,8 +3589,18 @@ public:
originating_node
(
i
.
originating_node
),
imsi
(
i
.
imsi
)
{}
gtpv2c_downlink_data_notification_failure_indication
&
operator
=
(
gtpv2c_downlink_data_notification_failure_indication
other
)
{
std
::
swap
(
ie_presence_mask
,
other
.
ie_presence_mask
);
std
::
swap
(
cause
,
other
.
cause
);
std
::
swap
(
originating_node
,
other
.
originating_node
);
std
::
swap
(
imsi
,
other
.
imsi
);
return
*
this
;
}
static
const
char
*
get_msg_name
()
{
return
"DOWNLINK_DATA_NOTIFICATION_FAILURE_INDICATION"
;};
uint64_t
ie_presence_mask
;
core
::
cause_t
cause
;
core
::
node_type_t
originating_node
;
core
::
imsi_t
imsi
;
...
...
@@ -3338,7 +3610,6 @@ public:
#define DOWNLINK_DATA_NOTIFICATION_FAILURE_IND_PR_IE_IMSI ((uint64_t)1 << 2)
#define DOWNLINK_DATA_NOTIFICATION_FAILURE_IND_PR_IE_PRIVATE_EXTENSION ((uint64_t)1 << 3)
static
const
uint8_t
msg_id
=
GTP_DOWNLINK_DATA_NOTIFICATION_FAILURE_INDICATION
;
uint64_t
ie_presence_mask
;
void
set
(
const
core
::
cause_t
&
v
,
const
uint8_t
instance
=
0
)
{
cause
=
v
;
ie_presence_mask
|=
DOWNLINK_DATA_NOTIFICATION_FAILURE_IND_PR_IE_CAUSE
;}
void
set
(
const
core
::
node_type_t
&
v
,
const
uint8_t
instance
=
0
)
{
originating_node
=
v
;
ie_presence_mask
|=
DOWNLINK_DATA_NOTIFICATION_FAILURE_IND_PR_IE_ORIGINATING_NODE
;}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment