sctp.c File Reference

sctp url_protocol More...

#include <netinet/in.h>
#include <netinet/sctp.h>
#include "config.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/parseutils.h"
#include "avformat.h"
#include "internal.h"
#include "network.h"
#include "os_support.h"
#include "url.h"
Include dependency graph for sctp.c:

Go to the source code of this file.

Data Structures

struct  SCTPContext
 

Typedefs

typedef struct SCTPContext SCTPContext
 

Functions

static int ff_sctp_recvmsg (int s, void *msg, size_t len, struct sockaddr *from, socklen_t *fromlen, struct sctp_sndrcvinfo *sinfo, int *msg_flags)
 
static int ff_sctp_send (int s, const void *msg, size_t len, const struct sctp_sndrcvinfo *sinfo, int flags)
 
static int sctp_open (URLContext *h, const char *uri, int flags)
 
static int sctp_wait_fd (int fd, int write)
 
static int sctp_read (URLContext *h, uint8_t *buf, int size)
 
static int sctp_write (URLContext *h, const uint8_t *buf, int size)
 
static int sctp_close (URLContext *h)
 
static int sctp_get_file_handle (URLContext *h)
 

Variables

URLProtocol ff_sctp_protocol
 

Detailed Description

sctp url_protocol

url syntax: sctp://host:port[?option=val...] option: 'listen' : listen for an incoming connection 'max_streams=n' : set the maximum number of streams 'reuse=1' : enable reusing the socket [TBD]

by setting the maximum number of streams the protocol will use the first two bytes of the incoming/outgoing buffer to store the stream number of the packet being read/written.

See also
sctp_read
sctp_write

Definition in file sctp.c.

Typedef Documentation

typedef struct SCTPContext SCTPContext

Function Documentation

static int ff_sctp_recvmsg ( int  s,
void msg,
size_t  len,
struct sockaddr *  from,
socklen_t *  fromlen,
struct sctp_sndrcvinfo *  sinfo,
int *  msg_flags 
)
static

Definition at line 73 of file sctp.c.

Referenced by sctp_read().

static int ff_sctp_send ( int  s,
const void msg,
size_t  len,
const struct sctp_sndrcvinfo *  sinfo,
int  flags 
)
static

Definition at line 115 of file sctp.c.

Referenced by sctp_write().

static int sctp_close ( URLContext h)
static

Definition at line 310 of file sctp.c.

static int sctp_get_file_handle ( URLContext h)
static

Definition at line 317 of file sctp.c.

static int sctp_open ( URLContext h,
const char *  uri,
int  flags 
)
static

Definition at line 156 of file sctp.c.

static int sctp_read ( URLContext h,
uint8_t buf,
int  size 
)
static

Definition at line 261 of file sctp.c.

static int sctp_wait_fd ( int  fd,
int  write 
)
static

Definition at line 251 of file sctp.c.

Referenced by sctp_read(), and sctp_write().

static int sctp_write ( URLContext h,
const uint8_t buf,
int  size 
)
static

Definition at line 284 of file sctp.c.

Variable Documentation

URLProtocol ff_sctp_protocol
Initial value:
= {
.name = "sctp",
.url_open = sctp_open,
.url_read = sctp_read,
.url_write = sctp_write,
.url_close = sctp_close,
.url_get_file_handle = sctp_get_file_handle,
.priv_data_size = sizeof(SCTPContext),
}
#define URL_PROTOCOL_FLAG_NETWORK
Definition: url.h:35
struct SCTPContext SCTPContext
static int sctp_write(URLContext *h, const uint8_t *buf, int size)
Definition: sctp.c:284
static int sctp_close(URLContext *h)
Definition: sctp.c:310
static int sctp_get_file_handle(URLContext *h)
Definition: sctp.c:317
static int sctp_open(URLContext *h, const char *uri, int flags)
Definition: sctp.c:156
static int flags
Definition: cpu.c:23
static int sctp_read(URLContext *h, uint8_t *buf, int size)
Definition: sctp.c:261

Definition at line 323 of file sctp.c.