diff options
| author | yangwei <[email protected]> | 2024-05-23 03:13:31 +0800 |
|---|---|---|
| committer | yangwei <[email protected]> | 2024-05-23 03:13:31 +0800 |
| commit | 16ea51487e6db53a4199d834dde3a59624f10da8 (patch) | |
| tree | 1ecafebcd6399cf816fa1250cc40579f025fb131 | |
| parent | a47b3b5a6eaf56b38edb31998555c2c62fb17ac2 (diff) | |
✨ feat(stream meta get): 支持按路由方向获取sidlistv4.3.57
| -rw-r--r-- | include/public/stream_inc/stream_control.h | 2 | ||||
| -rw-r--r-- | src/dealpkt/plug_support.c | 47 |
2 files changed, 49 insertions, 0 deletions
diff --git a/include/public/stream_inc/stream_control.h b/include/public/stream_inc/stream_control.h index cee6b1f..0f7ec24 100644 --- a/include/public/stream_inc/stream_control.h +++ b/include/public/stream_inc/stream_control.h @@ -69,6 +69,8 @@ enum MESA_stream_opt{ MSO_TCP_RTT_SCS, /* opt_val type must be unsigned short, the full RTT is server->tsg->client->tsg->server, this is |tsg->client->tsg| */
MSO_STREAM_C2S_SEGMENT_ID_LIST,
MSO_STREAM_S2C_SEGMENT_ID_LIST,
+ MSO_STREAM_INBOND_SEGMENT_ID_LIST,
+ MSO_STREAM_OUTBOND_SEGMENT_ID_LIST,
__MSO_MAX,
};
diff --git a/src/dealpkt/plug_support.c b/src/dealpkt/plug_support.c index 6358187..0576fcc 100644 --- a/src/dealpkt/plug_support.c +++ b/src/dealpkt/plug_support.c @@ -1953,6 +1953,53 @@ int MESA_get_stream_opt(const struct streaminfo *pstream, enum MESA_stream_opt o }
}
break;
+ case MSO_STREAM_INBOND_SEGMENT_ID_LIST:
+ {
+ ret = -1;
+ *opt_val_len = 0;
+ void **value = (void **)opt_val;
+ struct rawpkt_metadata *meta = NULL;
+ int dir=MESA_dir_link_to_human(pstream_pr->stream_c2s_route_dir);
+ if (dir==(int)'I')
+ {
+ meta = pstream_pr->polling_inject_context->meta_stream_dir[DIR_C2S - 1];
+ }
+ else
+ {
+ meta = pstream_pr->polling_inject_context->meta_stream_dir[DIR_S2C - 1];
+ }
+
+ if (meta)
+ {
+ *value = (void *)(&meta->raw_sid_list);
+ *opt_val_len = sizeof(struct segment_id_list);
+ ret = *opt_val_len;
+ }
+ }
+ break;
+ case MSO_STREAM_OUTBOND_SEGMENT_ID_LIST:
+ {
+ ret = -1;
+ *opt_val_len = 0;
+ void **value = (void **)opt_val;
+ struct rawpkt_metadata *meta = NULL;
+ int dir=MESA_dir_link_to_human(pstream_pr->stream_c2s_route_dir);
+ if (dir==(int)'E')
+ {
+ meta = pstream_pr->polling_inject_context->meta_stream_dir[DIR_C2S - 1];
+ }
+ else
+ {
+ meta = pstream_pr->polling_inject_context->meta_stream_dir[DIR_S2C - 1];
+ }
+ if (meta)
+ {
+ *value = (void *)(&meta->raw_sid_list);
+ *opt_val_len = sizeof(struct segment_id_list);
+ ret = *opt_val_len;
+ }
+ }
+ break;
case MSO_STREAM_C2S_LINK_ID:
case MSO_STREAM_S2C_LINK_ID:
{
|
