tbf: Save a timestamp at tbf allocation and print it in the VTY
This commit is contained in:
parent
772415fd8a
commit
80367aae17
|
@ -508,6 +508,7 @@ struct gprs_rlcmac_tbf *tbf_alloc(struct gprs_rlcmac_bts *bts,
|
||||||
if (!tbf)
|
if (!tbf)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
tbf->m_create_ts = time(NULL);
|
||||||
tbf->bts = bts->bts;
|
tbf->bts = bts->bts;
|
||||||
tbf->direction = dir;
|
tbf->direction = dir;
|
||||||
tbf->m_tfi = tfi;
|
tbf->m_tfi = tfi;
|
||||||
|
@ -1762,10 +1763,11 @@ void tbf_print_vty_info(struct vty *vty, llist_head *ltbf)
|
||||||
tbf->tlli(), tbf->is_tlli_valid() ? "valid" : "invalid",
|
tbf->tlli(), tbf->is_tlli_valid() ? "valid" : "invalid",
|
||||||
tbf->direction == GPRS_RLCMAC_UL_TBF ? "UL" : "DL",
|
tbf->direction == GPRS_RLCMAC_UL_TBF ? "UL" : "DL",
|
||||||
tbf->imsi(), VTY_NEWLINE);
|
tbf->imsi(), VTY_NEWLINE);
|
||||||
vty_out(vty, " state=%08x 1st_TS=%d 1st_cTS=%d ctrl_TS=%d "
|
vty_out(vty, " created=%lu state=%08x 1st_TS=%d 1st_cTS=%d ctrl_TS=%d "
|
||||||
"MS_CLASS=%d%s",
|
"MS_CLASS=%d%s",
|
||||||
tbf->state_flags, tbf->first_ts, tbf->first_common_ts,
|
tbf->create_ts(), tbf->state_flags, tbf->first_ts,
|
||||||
tbf->control_ts, tbf->ms_class, VTY_NEWLINE);
|
tbf->first_common_ts, tbf->control_ts, tbf->ms_class,
|
||||||
|
VTY_NEWLINE);
|
||||||
vty_out(vty, " TS_alloc=");
|
vty_out(vty, " TS_alloc=");
|
||||||
for (int i = 0; i < 8; i++) {
|
for (int i = 0; i < 8; i++) {
|
||||||
if (tbf->pdch[i])
|
if (tbf->pdch[i])
|
||||||
|
|
|
@ -138,6 +138,8 @@ struct gprs_rlcmac_tbf {
|
||||||
|
|
||||||
uint16_t sns() const;
|
uint16_t sns() const;
|
||||||
|
|
||||||
|
time_t create_ts() const;
|
||||||
|
|
||||||
/* attempt to make things a bit more fair */
|
/* attempt to make things a bit more fair */
|
||||||
void rotate_in_list();
|
void rotate_in_list();
|
||||||
|
|
||||||
|
@ -225,6 +227,7 @@ struct gprs_rlcmac_tbf {
|
||||||
uint32_t m_tlli;
|
uint32_t m_tlli;
|
||||||
uint8_t m_tlli_valid;
|
uint8_t m_tlli_valid;
|
||||||
uint8_t m_tfi;
|
uint8_t m_tfi;
|
||||||
|
time_t m_create_ts;
|
||||||
|
|
||||||
/* store IMSI for look-up and PCH retransmission */
|
/* store IMSI for look-up and PCH retransmission */
|
||||||
char m_imsi[16];
|
char m_imsi[16];
|
||||||
|
@ -310,6 +313,12 @@ inline uint16_t gprs_rlcmac_tbf::sns() const
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *tbf_name(gprs_rlcmac_tbf *tbf);
|
const char *tbf_name(gprs_rlcmac_tbf *tbf);
|
||||||
|
|
||||||
|
inline time_t gprs_rlcmac_tbf::create_ts() const
|
||||||
|
{
|
||||||
|
return m_create_ts;
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
Loading…
Reference in New Issue