summaryrefslogtreecommitdiff
path: root/src/dealpkt/plug_support.c
diff options
context:
space:
mode:
author杨威 <[email protected]>2023-05-08 15:25:30 +0800
committer杨威 <[email protected]>2023-05-08 15:25:30 +0800
commit756a8b3a0de1034342f8ebbe11297613e65eaab5 (patch)
tree66a33f8294463666c74c171528ca0cf82524dfc8 /src/dealpkt/plug_support.c
parente066340f9356a4f24ac261a1d3d262d586146865 (diff)
✨ feat(rawpkt): 调整控制报文相关接口
1、从marsio收包时,设置rawpkt中的标志位 2、rawpkt_get_opt支持读取是否为控制报文的标志位 3、修复获取SID_LIST时的RWA拼写错误 4、调整rawpkt_t结构体中的标志位定义,使内存排列更紧凑 TODO:更新inject_ctrl_pkt接口,直接调用marsio注入,不再复用sapp_inject
Diffstat (limited to 'src/dealpkt/plug_support.c')
-rw-r--r--src/dealpkt/plug_support.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/dealpkt/plug_support.c b/src/dealpkt/plug_support.c
index 2ec8961..83f74a9 100644
--- a/src/dealpkt/plug_support.c
+++ b/src/dealpkt/plug_support.c
@@ -322,6 +322,16 @@ int get_opt_from_rawpkt(const void *voidpkt, int type, void *void_value)
}
}
break;
+
+ case RAW_PKT_GET_IS_CTRL_PKT:
+ {
+ int *out_value = (int *)void_value;
+ *out_value = rawpkt->is_ctrl_pkt;
+ }
+ ret = sizeof(int);
+ break;
+
+
default:
sapp_runtime_log(RLOG_LV_FATAL, "get_opt_from_rawpkt(): not support option type: %d", type);
ret = -1;
@@ -519,7 +529,7 @@ int get_rawpkt_opt_from_streaminfo(const struct streaminfo *pstream, int type, v
}
}
break;
- case RWA_PKT_GET_SID_LIST:
+ case RAW_PKT_GET_SID_LIST:
{
void **value = (void **)out_value;
if(pstream_pr->polling_inject_context->meta[pstream->routedir] != NULL)