1/* RTCP code taken directly from the most recent RTP specification:
2 * draft-ietf-avt-rtp-new-11.txt
3 * C header
4 */
5
6#ifndef _RTCP_FROM_SPEC_H
7#define _RTCP_FROM_SPEC_H
8
9#include <stdlib.h>
10
11/* Definitions of _ANSI_ARGS and EXTERN that will work in either
12 C or C++ code:
13 */
14#undef _ANSI_ARGS_
15#if ((defined(__STDC__) || defined(SABER)) && !defined(NO_PROTOTYPE)) || defined(__cplusplus) || defined(USE_PROTOTYPE)
16# define _ANSI_ARGS_(x) x
17#else
18# define _ANSI_ARGS_(x) ()
19#endif
20#ifdef __cplusplus
21# define EXTERN extern "C"
22#else
23# define EXTERN extern
24#endif
25
26/* The code from the spec assumes a type "event"; make this a void*: */
27typedef void* event;
28
29#define EVENT_UNKNOWN 0
30#define EVENT_REPORT 1
31#define EVENT_BYE 2
32
33/* The code from the spec assumes a type "time_tp"; make this a double: */
34typedef double time_tp;
35
36/* The code from the spec assumes a type "packet"; make this a void*: */
37typedef void* packet;
38
39#define PACKET_UNKNOWN_TYPE 0
40#define PACKET_RTP 1
41#define PACKET_RTCP_REPORT 2
42#define PACKET_BYE 3
43#define PACKET_RTCP_APP 4
44
45/* The code from the spec calls drand48(), but we have drand30() instead */
46#define drand48 drand30
47
48/* The code calls "exit()", but we don't want to exit, so make it a noop: */
49#define exit(n) do {} while (0)
50
51#ifndef FALSE
52#define FALSE 0
53#endif
54#ifndef TRUE
55#define TRUE 1
56#endif
57
58/* EXPORTS: */
59
60EXTERN void OnExpire _ANSI_ARGS_((event, int, int, double, int, double*, int*, time_tp, time_tp*, int*));
61
62EXTERN void OnReceive _ANSI_ARGS_((packet, event, int*, int*, int*, double*, double*, double, double));
63
64/* IMPORTS: */
65
66EXTERN void Schedule _ANSI_ARGS_((double,event));
67EXTERN void Reschedule _ANSI_ARGS_((double,event));
68EXTERN void SendRTCPReport _ANSI_ARGS_((event));
69EXTERN void SendBYEPacket _ANSI_ARGS_((event));
70EXTERN int TypeOfEvent _ANSI_ARGS_((event));
71EXTERN int SentPacketSize _ANSI_ARGS_((event));
72EXTERN int PacketType _ANSI_ARGS_((packet));
73EXTERN int ReceivedPacketSize _ANSI_ARGS_((packet));
74EXTERN int NewMember _ANSI_ARGS_((packet));
75EXTERN int NewSender _ANSI_ARGS_((packet));
76EXTERN void AddMember _ANSI_ARGS_((packet));
77EXTERN void AddSender _ANSI_ARGS_((packet));
78EXTERN void RemoveMember _ANSI_ARGS_((packet));
79EXTERN void RemoveSender _ANSI_ARGS_((packet));
80EXTERN double drand30 _ANSI_ARGS_((void));
81
82#endif
83