diff --git a/srsepc/hdr/hss/hss.h b/srsepc/hdr/hss/hss.h index 4df632d83..6679e737c 100644 --- a/srsepc/hdr/hss/hss.h +++ b/srsepc/hdr/hss/hss.h @@ -60,6 +60,7 @@ typedef struct{ uint8_t opc[16]; uint8_t amf[2]; uint8_t sqn[6]; + uint16_t qci; uint8_t last_rand[16]; }hss_ue_ctx_t; diff --git a/srsepc/src/hss/hss.cc b/srsepc/src/hss/hss.cc index cd48f23c1..1cce6e652 100644 --- a/srsepc/src/hss/hss.cc +++ b/srsepc/src/hss/hss.cc @@ -153,7 +153,7 @@ hss::read_db_file(std::string db_filename) { if(line[0] != '#') { - uint column_size = 7; + uint column_size = 8; std::vector split = split_string(line,','); if(split.size() != column_size) { @@ -192,7 +192,8 @@ hss::read_db_file(std::string db_filename) m_hss_log->debug_hex(ue_ctx->opc, 16, "User OPc : "); m_hss_log->debug_hex(ue_ctx->amf, 2, "AMF : "); m_hss_log->debug_hex(ue_ctx->sqn, 6, "SQN : "); - + ue_ctx->qci = atoi(split[7].c_str()); + m_hss_log->debug("Default Bearer QCI: %d\n",ue_ctx->qci); m_imsi_to_ue_ctx.insert(std::pair(ue_ctx->imsi,ue_ctx)); } } @@ -258,10 +259,11 @@ bool hss::write_db_file(std::string db_filename) m_db_file << hex_string(it->second->amf, 2); m_db_file << ","; m_db_file << hex_string(it->second->sqn, 6); + m_db_file << ","; + m_db_file << it->second->qci; m_db_file << std::endl; it++; } - if(m_db_file.is_open()) { m_db_file.close(); diff --git a/srsepc/user_db.csv.example b/srsepc/user_db.csv.example index f1470c801..77ab1e7a8 100644 --- a/srsepc/user_db.csv.example +++ b/srsepc/user_db.csv.example @@ -1,6 +1,6 @@ # # .csv to store UE's information in HSS -# Kept in the following format: "Name,IMSI,Key,OP_Type,OP,AMF,SQN" +# Kept in the following format: "Name,IMSI,Key,OP_Type,OP,AMF,SQN,QCI" # # Name: Human readable name to help distinguish UE's. Ignored by the HSS # IMSI: UE's IMSI value