diff options
| author | [email protected] <[email protected]> | 2021-11-02 12:34:05 +0800 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2021-11-02 12:34:05 +0800 |
| commit | 31f55f0b88d4af34a8a36497f5e49c69b88b2fbf (patch) | |
| tree | 63515b3ceb361369cdc88ae6db1a808fc80e5b42 /include/MESA/stream_inc/sapp_inject.h | |
Diffstat (limited to 'include/MESA/stream_inc/sapp_inject.h')
| -rw-r--r-- | include/MESA/stream_inc/sapp_inject.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/include/MESA/stream_inc/sapp_inject.h b/include/MESA/stream_inc/sapp_inject.h new file mode 100644 index 0000000..cbcaab1 --- /dev/null +++ b/include/MESA/stream_inc/sapp_inject.h @@ -0,0 +1,37 @@ +#ifndef _SAPP_INJECT_H_ +#define _SAPP_INJECT_H_ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +#include "stream_base.h" + +enum sapp_inject_opt{ + SIO_DEFAULT = (1<<0), /* ������ֻ���봿����, ��ƽ̨����Э��淶���쵱ǰ��Ĵ�����IPͷ��, ���������, ����������Ƕ�ײ��ͷ�� */ + SIO_EXCLUDE_THIS_LAYER_HDR = (1<<1), /* ��������, ��ǰ��Ĵ�����IPͷ��Ҳ�ɵ����߹���, ƽ̨���������ǰ��ij��ز�ͷ��, ���������, ����������Ƕ�ײ��ͷ�� */ +}; + +/* + ARGS: + stream: ��ǰ���ṹ��ָ��; + payload: Ҫ���͵ĸ���ָ��; + payload_len: Ҫ���͵ĸ��س���; + snd_routedir: Ҫ�������ݵ�route����, + ������͵İ��뵱ǰ��ͬ��, snd_routedir = stream->routedir, + ������͵İ��뵱ǰ������, snd_routedir = MESA_dir_reverse(stream->routedir). + + return value: + <=0 : error. + > 0 : ���͵����ݰ�ʵ���ܳ���(payload_len + �ײ��ͷ����); +*/ +int sapp_inject_pkt(struct streaminfo *stream, enum sapp_inject_opt sio, const void *payload, int payload_len, unsigned char snd_routedir); + + + +#ifdef __cplusplus +} +#endif + +#endif + |
