TSG-13837 decrypted traffic steering适配mrzcpd新增MR_BUFF_USER_0类型
This commit is contained in:
@@ -15,12 +15,13 @@
|
||||
#include "ctrl_packet.h"
|
||||
#include "global_metrics.h"
|
||||
|
||||
#define RX_BURST_MAX 128
|
||||
#define MR_MASK_DECRYPTED 0x01
|
||||
|
||||
/******************************************************************************
|
||||
* struct
|
||||
******************************************************************************/
|
||||
|
||||
#define RX_BURST_MAX 128
|
||||
|
||||
struct config
|
||||
{
|
||||
int bypass_all_traffic;
|
||||
@@ -91,13 +92,20 @@ int mbuff_get_metadata(marsio_buff_t *rx_buff, struct metadata *meta)
|
||||
else
|
||||
{
|
||||
meta->is_ctrl_pkt = 0;
|
||||
#if 0
|
||||
if (marsio_buff_get_metadata(rx_buff, MR_IS_DECRYPTED, &(meta->is_decrypted), sizeof(meta->is_decrypted)) <= 0)
|
||||
uint16_t user_data = 0;
|
||||
if (marsio_buff_get_metadata(rx_buff, MR_BUFF_USER_0, &user_data, sizeof(user_data)) <= 0)
|
||||
{
|
||||
LOG_ERROR("%s: unable to get is_decrypted from metadata", LOG_TAG_PKTIO);
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
if (user_data & MR_MASK_DECRYPTED)
|
||||
{
|
||||
meta->is_decrypted = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
meta->is_decrypted = 0;
|
||||
}
|
||||
}
|
||||
|
||||
meta->sids.num = marsio_buff_get_sid_list(rx_buff, meta->sids.elems, sizeof(meta->sids.elems) / sizeof(meta->sids.elems[0]));
|
||||
@@ -143,14 +151,17 @@ int mbuff_set_metadata(marsio_buff_t *tx_buff, struct metadata *meta)
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO
|
||||
#if 0
|
||||
if (marsio_buff_set_metadata(tx_buff, MR_IS_DECRYPTED, &(meta->is_decrypted), sizeof(meta->is_decrypted)) != 0)
|
||||
uint16_t user_data = 0;
|
||||
if (meta->is_decrypted)
|
||||
{
|
||||
user_data = MR_MASK_DECRYPTED;
|
||||
}
|
||||
|
||||
if (marsio_buff_set_metadata(tx_buff, MR_BUFF_USER_0, &user_data, sizeof(user_data)) != 0)
|
||||
{
|
||||
LOG_ERROR("%s: unable to set is_decrypted for metadata", LOG_TAG_PKTIO);
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (meta->sids.num > 0)
|
||||
|
||||
Reference in New Issue
Block a user