@ -87,58 +87,44 @@ public:
void write_pdu ( unique_byte_buffer_t pdu ) ;
void write_pdu ( unique_byte_buffer_t pdu ) ;
private :
private :
byte_buffer_pool * pool ;
byte_buffer_pool * pool = byte_buffer_pool : : get_instance ( ) ;
srslte : : log * log ;
srslte : : log * log = nullptr ;
srsue : : rlc_interface_pdcp * rlc ;
srsue : : rlc_interface_pdcp * rlc = nullptr ;
srsue : : rrc_interface_pdcp * rrc ;
srsue : : rrc_interface_pdcp * rrc = nullptr ;
srsue : : gw_interface_pdcp * gw ;
srsue : : gw_interface_pdcp * gw = nullptr ;
bool active ;
bool active = false ;
uint32_t lcid ;
uint32_t lcid = 0 ;
srslte_pdcp_config_t cfg ;
srslte_pdcp_config_t cfg = { } ;
uint8_t sn_len_bytes ;
uint8_t sn_len_bytes = 0 ;
bool do_integrity ;
bool do_integrity = false ;
bool do_encryption ;
bool do_encryption = false ;
uint32_t rx_count ;
uint32_t rx_count = 0 ;
uint32_t tx_count ;
uint32_t tx_count = 0 ;
uint8_t k_rrc_enc [ 32 ] ;
uint8_t k_rrc_enc [ 32 ] = { } ;
uint8_t k_rrc_int [ 32 ] ;
uint8_t k_rrc_int [ 32 ] = { } ;
uint8_t k_up_enc [ 32 ] ;
uint8_t k_up_enc [ 32 ] = { } ;
uint32_t rx_hfn ;
uint32_t rx_hfn = 0 ;
uint32_t next_pdcp_rx_sn ;
uint32_t next_pdcp_rx_sn = 0 ;
uint32_t reordering_window ;
uint32_t reordering_window = 0 ;
uint32_t last_submitted_pdcp_rx_sn ;
uint32_t last_submitted_pdcp_rx_sn = 0 ;
uint32_t maximum_pdcp_sn = 0 ;
CIPHERING_ALGORITHM_ID_ENUM cipher_algo ;
INTEGRITY_ALGORITHM_ID_ENUM integ_algo ;
CIPHERING_ALGORITHM_ID_ENUM cipher_algo = CIPHERING_ALGORITHM_ID_EEA0 ;
INTEGRITY_ALGORITHM_ID_ENUM integ_algo = INTEGRITY_ALGORITHM_ID_EIA0 ;
uint32_t maximum_pdcp_sn ;
pthread_mutex_t mutex ;
pthread_mutex_t mutex ;
void handle_um_drb_pdu ( const srslte : : unique_byte_buffer_t & pdu ) ;
void handle_um_drb_pdu ( const srslte : : unique_byte_buffer_t & pdu ) ;
void handle_am_drb_pdu ( const srslte : : unique_byte_buffer_t & pdu ) ;
void handle_am_drb_pdu ( const srslte : : unique_byte_buffer_t & pdu ) ;
void integrity_generate ( uint8_t * msg ,
void integrity_generate ( uint8_t * msg , uint32_t msg_len , uint8_t * mac ) ;
uint32_t msg_len ,
bool integrity_verify ( uint8_t * msg , uint32_t count , uint32_t msg_len , uint8_t * mac ) ;
uint8_t * mac ) ;
void cipher_encrypt ( uint8_t * msg , uint32_t msg_len , uint8_t * ct ) ;
void cipher_decrypt ( uint8_t * ct , uint32_t count , uint32_t ct_len , uint8_t * msg ) ;
bool integrity_verify ( uint8_t * msg ,
uint32_t count ,
uint32_t msg_len ,
uint8_t * mac ) ;
void cipher_encrypt ( uint8_t * msg ,
uint32_t msg_len ,
uint8_t * ct ) ;
void cipher_decrypt ( uint8_t * ct ,
uint32_t count ,
uint32_t ct_len ,
uint8_t * msg ) ;
} ;
} ;
/****************************************************************************
/****************************************************************************