Commit 74c26097 authored by Rohan's avatar Rohan
Browse files

urr_id generation

parent 9b707ff3
......@@ -331,6 +331,18 @@ void smf_pdu_session::set_seid(const uint64_t& s) {
seid = s;
}
//------------------------------------------------------------------------------
// TODO check if urr_id should be uniq in the UPF or in the context of a pdn
// connection
void smf_pdu_session::generate_urr_id(pfcp::urr_id_t& urr_id) {
urr_id.urr_id = urr_id_generator.get_uid();
}
//------------------------------------------------------------------------------
void smf_pdu_session::release_urr_id(const pfcp::urr_id_t& urr_id) {
urr_id_generator.free_uid(urr_id.urr_id);
}
//------------------------------------------------------------------------------
// TODO check if far_id should be uniq in the UPF or in the context of a pdn
// connection
......
......@@ -296,7 +296,19 @@ class smf_pdu_session : public std::enable_shared_from_this<smf_pdu_session> {
* @return void
*/
void release_pdr_id(const pfcp::pdr_id_t& pdr_id);
/*
* Generate a URR ID
* @param [pfcp::urr_id_t &]: far_id: URR ID generated
* @return void
*/
void generate_urr_id(pfcp::urr_id_t& urr_id);
/*
* Release a URR ID
* @param [const pfcp::urr_id_t &]: far_id: URR ID to be released
* @return void
*/
void release_urr_id(const pfcp::urr_id_t& urr_id);
/*
* Generate a FAR ID
* @param [pfcp::far_id_t &]: far_id: FAR ID generated
......@@ -420,6 +432,7 @@ class smf_pdu_session : public std::enable_shared_from_this<smf_pdu_session> {
//
util::uint_generator<uint16_t> pdr_id_generator;
util::uint_generator<uint32_t> far_id_generator;
util::uint_generator<uint32_t> urr_id_generator;
uint32_t pdu_session_id;
std::string amf_id;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment