Classes | Defines | Typedefs | Enumerations | Functions | Variables
rtspd.c File Reference
#include "server_setup.h"
#include "curlx.h"
#include "getpart.h"
#include "util.h"
#include "server_sockaddr.h"
#include "memdebug.h"
Include dependency graph for rtspd.c:

Go to the source code of this file.

Classes

struct  httprequest

Defines

#define CMD_AUTH_REQUIRED   "auth_required"
#define CMD_IDLE   "idle"
#define CMD_STREAM   "stream"
#define DEFAULT_LOGFILE   "log/rtspd.log"
#define DEFAULT_PORT   8999
#define ENABLE_CURLX_PRINTF
#define END_OF_HEADERS   "\r\n\r\n"
#define MAXDOCNAMELEN   140000
#define MAXDOCNAMELEN_TXT   "139999"
#define RCMD_IDLE   1 /* told to sit idle */
#define RCMD_NORMALREQ   0 /* default request, use the tests file normally */
#define RCMD_STREAM   2 /* told to stream */
#define REQBUFSIZ   150000
#define REQBUFSIZ_TXT   "149999"
#define REQUEST_DUMP   "log/server.input"
#define REQUEST_KEYWORD_SIZE   256
#define REQUEST_KEYWORD_SIZE_TXT   "255"
#define RESPONSE_DUMP   "log/server.response"
#define RTP_DATA_SIZE   12
#define RTSPDVERSION   "curl test suite RTSP server/0.1"
#define SET_RTP_PKT_CHN(p, c)   ((p)[1] = (unsigned char)((c) & 0xFF))
#define SET_RTP_PKT_LEN(p, l)
#define siginterrupt(x, y)   do {} while(0)
#define STREAMTHIS   "a string to stream 01234567890\n"

Typedefs

typedef RETSIGTYPE(* SIGHANDLER_T )(int)

Enumerations

enum  {
  DOCNUMBER_NOTHING = -7, DOCNUMBER_QUIT = -6, DOCNUMBER_BADCONNECT = -5, DOCNUMBER_INTERNAL = -4,
  DOCNUMBER_CONNECT = -3, DOCNUMBER_WERULEZ = -2, DOCNUMBER_404 = -1
}
enum  reqprot_t { RPROT_NONE = 0, RPROT_RTSP = 1, RPROT_HTTP = 2 }

Functions

static RETSIGTYPE exit_signal_handler (int signum)
static int get_request (curl_socket_t sock, struct httprequest *req)
static void install_signal_handlers (void)
int main (int argc, char *argv[])
static int ProcessRequest (struct httprequest *req)
static void restore_signal_handlers (void)
static int send_doc (curl_socket_t sock, struct httprequest *req)
static void storerequest (char *reqbuf, size_t totalsize)

Variables

static const char * doc404_HTTP = "</BODY></HTML>\n"
static const char * doc404_RTSP
static const char * docbadconnect = "HTTP/1.1 501 Forbidden you fool" END_OF_HEADERS
static const char * docconnect = "HTTP/1.1 200 Mighty fine indeed" END_OF_HEADERS
static const char * docquit = "HTTP/1.1 200 Goodbye" END_OF_HEADERS
static volatile int exit_signal = 0
SIG_ATOMIC_T got_exit_signal = 0
static const char * ipv_inuse = "IPv4"
static bool prevbounce = FALSE
static long prevpartno = -1
static long prevtestno = -1
static const char * RTP_DATA = "$_1234\n\0asdf"
const char * serverlogfile = DEFAULT_LOGFILE
static int serverlogslocked = 0

Define Documentation

#define CMD_AUTH_REQUIRED   "auth_required"

Definition at line 144 of file rtspd.c.

#define CMD_IDLE   "idle"

Definition at line 148 of file rtspd.c.

#define CMD_STREAM   "stream"

Definition at line 151 of file rtspd.c.

#define DEFAULT_LOGFILE   "log/rtspd.log"

Definition at line 127 of file rtspd.c.

#define DEFAULT_PORT   8999

Definition at line 124 of file rtspd.c.

Definition at line 46 of file rtspd.c.

#define END_OF_HEADERS   "\r\n\r\n"

Definition at line 153 of file rtspd.c.

#define MAXDOCNAMELEN   140000

Definition at line 138 of file rtspd.c.

#define MAXDOCNAMELEN_TXT   "139999"

Definition at line 139 of file rtspd.c.

#define RCMD_IDLE   1 /* told to sit idle */

Definition at line 80 of file rtspd.c.

#define RCMD_NORMALREQ   0 /* default request, use the tests file normally */

Definition at line 79 of file rtspd.c.

#define RCMD_STREAM   2 /* told to stream */

Definition at line 81 of file rtspd.c.

#define REQBUFSIZ   150000

Definition at line 70 of file rtspd.c.

#define REQBUFSIZ_TXT   "149999"

Definition at line 71 of file rtspd.c.

#define REQUEST_DUMP   "log/server.input"

Definition at line 134 of file rtspd.c.

#define REQUEST_KEYWORD_SIZE   256

Definition at line 141 of file rtspd.c.

#define REQUEST_KEYWORD_SIZE_TXT   "255"

Definition at line 142 of file rtspd.c.

#define RESPONSE_DUMP   "log/server.response"

Definition at line 135 of file rtspd.c.

#define RTP_DATA_SIZE   12

Definition at line 198 of file rtspd.c.

#define RTSPDVERSION   "curl test suite RTSP server/0.1"

Definition at line 132 of file rtspd.c.

#define SET_RTP_PKT_CHN (   p,
 
)    ((p)[1] = (unsigned char)((c) & 0xFF))

Definition at line 89 of file rtspd.c.

#define SET_RTP_PKT_LEN (   p,
 
)
Value:
(((p)[2] = (unsigned char)(((l) >> 8) & 0xFF)), \
                              ((p)[3] = (unsigned char)((l) & 0xFF)))

Definition at line 91 of file rtspd.c.

#define siginterrupt (   x,
  y 
)    do {} while(0)

Definition at line 204 of file rtspd.c.

#define STREAMTHIS   "a string to stream 01234567890\n"

Typedef Documentation

typedef RETSIGTYPE(* SIGHANDLER_T)(int)

Definition at line 209 of file rtspd.c.


Enumeration Type Documentation

anonymous enum
Enumerator:
DOCNUMBER_NOTHING 
DOCNUMBER_QUIT 
DOCNUMBER_BADCONNECT 
DOCNUMBER_INTERNAL 
DOCNUMBER_CONNECT 
DOCNUMBER_WERULEZ 
DOCNUMBER_404 

Definition at line 155 of file rtspd.c.

enum reqprot_t
Enumerator:
RPROT_NONE 
RPROT_RTSP 
RPROT_HTTP 

Definition at line 83 of file rtspd.c.


Function Documentation

static RETSIGTYPE exit_signal_handler ( int  signum) [static]

Definition at line 248 of file rtspd.c.

static int get_request ( curl_socket_t  sock,
struct httprequest req 
) [static]

Definition at line 783 of file rtspd.c.

static void install_signal_handlers ( void  ) [static]

Definition at line 259 of file rtspd.c.

int main ( int  argc,
char *  argv[] 
)

Definition at line 1185 of file rtspd.c.

static int ProcessRequest ( struct httprequest req) [static]

Definition at line 333 of file rtspd.c.

static void restore_signal_handlers ( void  ) [static]

Definition at line 305 of file rtspd.c.

static int send_doc ( curl_socket_t  sock,
struct httprequest req 
) [static]

Definition at line 894 of file rtspd.c.

static void storerequest ( char *  reqbuf,
size_t  totalsize 
) [static]

Definition at line 730 of file rtspd.c.


Variable Documentation

const char* doc404_HTTP = "</BODY></HTML>\n" [static]

Definition at line 179 of file rtspd.c.

const char* doc404_RTSP [static]
Initial value:

Definition at line 193 of file rtspd.c.

const char* docbadconnect = "HTTP/1.1 501 Forbidden you fool" END_OF_HEADERS [static]

Definition at line 175 of file rtspd.c.

const char* docconnect = "HTTP/1.1 200 Mighty fine indeed" END_OF_HEADERS [static]

Definition at line 171 of file rtspd.c.

const char* docquit = "HTTP/1.1 200 Goodbye" END_OF_HEADERS [static]

Definition at line 167 of file rtspd.c.

volatile int exit_signal = 0 [static]

Definition at line 241 of file rtspd.c.

Definition at line 237 of file rtspd.c.

const char* ipv_inuse = "IPv4" [static]

Definition at line 67 of file rtspd.c.

bool prevbounce = FALSE [static]

Definition at line 75 of file rtspd.c.

long prevpartno = -1 [static]

Definition at line 74 of file rtspd.c.

long prevtestno = -1 [static]

Definition at line 73 of file rtspd.c.

const char* RTP_DATA = "$_1234\n\0asdf" [static]

Definition at line 199 of file rtspd.c.

Definition at line 130 of file rtspd.c.

int serverlogslocked = 0 [static]

Definition at line 68 of file rtspd.c.



rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:09