1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
/* -*- C++ -*- */
/* $Id$ */
module SFP
{
enum message_type
{
// Messages in the forward direction
START,
ENDOFSTREAM,
SIMPLEFRAME,
SEQUENCEDFRAME,
FRAME,
SPECIALFRAME,
// Messages in the reverse direction
STARTREPLY,
CREDIT
};
struct frame_header
{
char magic_number [4];
// '=', 'S', 'F', 'P'
octet flags;
// bit 0 = byte order,
// 1 = fragments, 2-7 always 0
octet message_type;
unsigned long message_size;
// Size following this header
};
struct fragment
{
char magic_number[4];
// 'F', 'R', 'A', 'G'
octet flags;
// bit 1 = more fragments
unsigned long frag_number;
// 0,..,n
unsigned long frag_sz;
unsigned long source_id;
// Required for UDP multicast with multiple sources
};
struct start_message
{
char magic_number[4];
// '=', 'S', 'T', 'A'
octet major_version;
octet minor_version;
octet flags;
// bit 0 = byte order
};
// Acknowledge successful processing of
// Start
struct start_reply
{
octet flags;
// bit 0 = byte order, 1 = exception
};
// If the message_type in frameHeader is sequencedFrame
// the the frameHeader will be followed by this
// (See also RTP note)
struct sequenced_frame
{
unsigned long sequence_num;
};
// If the message_type is Frame then
// the frameHeader is followed by this
// See also RTP note
struct frame
{
unsigned long timestamp;
unsigned long synch_source;
sequence<unsigned long> source_ids;
};
};
|