summaryrefslogtreecommitdiff
path: root/include/MESA/stream_inc/sapp_inject.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/MESA/stream_inc/sapp_inject.h')
-rw-r--r--include/MESA/stream_inc/sapp_inject.h37
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
+