ucspi-ssl  0.99e
TLS encryption for IPv6 communication
Data Structures | Macros | Typedefs | Functions | Variables
buffer.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  buffer
 

Macros

#define BUFFER_INIT(op, fd, buf, len)   { (buf), 0, (len), (fd), (op) }
 
#define BUFFER_INSIZE   8192
 
#define BUFFER_OUTSIZE   8192
 
#define buffer_PUTC(s, c)
 
#define buffer_PEEK(s)   ( (s)->x + (s)->n )
 
#define buffer_SEEK(s, len)   ( ( (s)->p -= (len) ) , ( (s)->n += (len) ) )
 
#define buffer_GETC(s, c)
 

Typedefs

typedef struct buffer buffer
 

Functions

void buffer_init (buffer *, int(*)(), int, char *, unsigned int)
 
int buffer_flush (buffer *)
 
int buffer_put (buffer *, const char *, unsigned int)
 
int buffer_putalign (buffer *, const char *, unsigned int)
 
int buffer_putflush (buffer *, const char *, unsigned int)
 
int buffer_puts (buffer *, const char *)
 
int buffer_putsalign (buffer *, const char *)
 
int buffer_putsflush (buffer *, const char *)
 
int buffer_get (buffer *, char *, unsigned int)
 
int buffer_bget (buffer *, char *, unsigned int)
 
int buffer_feed (buffer *)
 
char * buffer_peek (buffer *)
 
void buffer_seek (buffer *, unsigned int)
 
int buffer_copy (buffer *, buffer *)
 
int buffer_unixread (int, char *, unsigned int)
 
int buffer_unixwrite (int, const char *, unsigned int)
 

Variables

bufferbuffer_0
 
bufferbuffer_0small
 
bufferbuffer_1
 
bufferbuffer_1small
 
bufferbuffer_2
 

Macro Definition Documentation

◆ buffer_GETC

#define buffer_GETC (   s,
 
)
Value:
( ((s)->p > 0) \
? ( *(c) = (s)->x[(s)->n], buffer_SEEK((s),1), 1 ) \
: buffer_get((s),(c),1) \
)
#define buffer_SEEK(s, len)
Definition: buffer.h:42
int buffer_get(buffer *, char *, unsigned int)
Definition: buffer_get.c:50

Definition at line 44 of file buffer.h.

◆ BUFFER_INIT

#define BUFFER_INIT (   op,
  fd,
  buf,
  len 
)    { (buf), 0, (len), (fd), (op) }

Definition at line 14 of file buffer.h.

◆ BUFFER_INSIZE

#define BUFFER_INSIZE   8192

Definition at line 15 of file buffer.h.

◆ BUFFER_OUTSIZE

#define BUFFER_OUTSIZE   8192

Definition at line 16 of file buffer.h.

◆ buffer_PEEK

#define buffer_PEEK (   s)    ( (s)->x + (s)->n )

Definition at line 41 of file buffer.h.

◆ buffer_PUTC

#define buffer_PUTC (   s,
 
)
Value:
( ((s)->n != (s)->p) \
? ( (s)->x[(s)->p++] = (c), 0 ) \
: buffer_put((s),&(c),1) \
)
int buffer_put(buffer *, const char *, unsigned int)
Definition: buffer_put.c:49

Definition at line 28 of file buffer.h.

◆ buffer_SEEK

#define buffer_SEEK (   s,
  len 
)    ( ( (s)->p -= (len) ) , ( (s)->n += (len) ) )

Definition at line 42 of file buffer.h.

Typedef Documentation

◆ buffer

typedef struct buffer buffer

Function Documentation

◆ buffer_bget()

int buffer_bget ( buffer ,
char *  ,
unsigned  int 
)

Definition at line 40 of file buffer_get.c.

◆ buffer_copy()

int buffer_copy ( buffer ,
buffer  
)

Definition at line 3 of file buffer_copy.c.

◆ buffer_feed()

int buffer_feed ( buffer )

Definition at line 27 of file buffer_get.c.

◆ buffer_flush()

int buffer_flush ( buffer )

Definition at line 25 of file buffer_put.c.

Here is the caller graph for this function:

◆ buffer_get()

int buffer_get ( buffer ,
char *  ,
unsigned  int 
)

Definition at line 50 of file buffer_get.c.

◆ buffer_init()

void buffer_init ( buffer ,
int(*)()  ,
int  ,
char *  ,
unsigned  int 
)

Definition at line 5 of file buffer.c.

Here is the caller graph for this function:

◆ buffer_peek()

char* buffer_peek ( buffer )

Definition at line 60 of file buffer_get.c.

◆ buffer_put()

int buffer_put ( buffer ,
const char *  ,
unsigned  int 
)

Definition at line 49 of file buffer_put.c.

Here is the caller graph for this function:

◆ buffer_putalign()

int buffer_putalign ( buffer ,
const char *  ,
unsigned  int 
)

Definition at line 35 of file buffer_put.c.

Here is the caller graph for this function:

◆ buffer_putflush()

int buffer_putflush ( buffer ,
const char *  ,
unsigned  int 
)

Definition at line 71 of file buffer_put.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ buffer_puts()

int buffer_puts ( buffer ,
const char *   
)

Definition at line 82 of file buffer_put.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ buffer_putsalign()

int buffer_putsalign ( buffer ,
const char *   
)

Definition at line 77 of file buffer_put.c.

Here is the call graph for this function:

◆ buffer_putsflush()

int buffer_putsflush ( buffer ,
const char *   
)

Definition at line 87 of file buffer_put.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ buffer_seek()

void buffer_seek ( buffer ,
unsigned  int 
)

Definition at line 65 of file buffer_get.c.

◆ buffer_unixread()

int buffer_unixread ( int  ,
char *  ,
unsigned  int 
)

Definition at line 6 of file buffer_read.c.

Here is the caller graph for this function:

◆ buffer_unixwrite()

int buffer_unixwrite ( int  ,
const char *  ,
unsigned  int 
)

Definition at line 6 of file buffer_write.c.

Here is the caller graph for this function:

Variable Documentation

◆ buffer_0

buffer* buffer_0

Definition at line 13 of file buffer_0.c.

◆ buffer_0small

buffer* buffer_0small

◆ buffer_1

buffer* buffer_1

Definition at line 7 of file buffer_1.c.

◆ buffer_1small

buffer* buffer_1small

◆ buffer_2

buffer* buffer_2

Definition at line 7 of file buffer_2.c.