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
Expand all
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
This diff is collapsed.
Click to expand it.
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