webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Macros | Functions | Variables
datachan_serv.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <sys/types.h>
#include <unistd.h>
#include <time.h>
#include <sys/socket.h>
#include <sys/select.h>
#include <sys/errno.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <usrsctp.h>
#include "datachan.h"

Macros

#define SIZEOF_ARRAY(x)   (sizeof(x)/sizeof((x)[0]))
 
#define MAX_INPUT_LINE   1024
 
#define MAX_CHANNELS   100
 
#define INVALID_STREAM   0xFFFF
 

Functions

void send_error_response (struct socket *sock, struct rtcweb_datachannel_msg *msg, struct sctp_rcvinfo *rcv, uint16_t error)
 
void debug_printf (const char *format,...)
 
int main (int argc, char *argv[])
 

Variables

struct {
   int8_t   pending
 
   uint8_t   channel_type
 
   uint16_t   flags
 
   uint16_t   reverse
 
   uint16_t   reliability_params
 
channels_out [MAX_CHANNELS]
 
struct {
   uint8_t   in_use
 
channels_in [MAX_CHANNELS]
 
int num_channels = 0
 

Macro Definition Documentation

◆ INVALID_STREAM

#define INVALID_STREAM   0xFFFF

◆ MAX_CHANNELS

#define MAX_CHANNELS   100

◆ MAX_INPUT_LINE

#define MAX_INPUT_LINE   1024

◆ SIZEOF_ARRAY

#define SIZEOF_ARRAY (   x)    (sizeof(x)/sizeof((x)[0]))

Function Documentation

◆ debug_printf()

void debug_printf ( const char *  format,
  ... 
)

◆ main()

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

◆ send_error_response()

void send_error_response ( struct socket sock,
struct rtcweb_datachannel_msg msg,
struct sctp_rcvinfo rcv,
uint16_t  error 
)

Variable Documentation

◆ channel_type

uint8_t channel_type

◆ channels_in

struct { ... } channels_in[MAX_CHANNELS]

◆ channels_out

struct { ... } channels_out[MAX_CHANNELS]

◆ flags

◆ in_use

uint8_t in_use

◆ num_channels

int num_channels = 0

◆ pending

int8_t pending

◆ reliability_params

uint16_t reliability_params

◆ reverse

uint16_t reverse