OpenDNSSEC-signer  1.4.7
Data Structures | Macros | Typedefs | Functions
tcpset.h File Reference
#include "config.h"
#include "shared/allocator.h"
#include "wire/buffer.h"
#include "wire/xfrd.h"
#include <stdint.h>
Include dependency graph for tcpset.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  tcp_conn_struct
 
struct  tcp_set_struct
 

Macros

#define TCPSET_MAX   50
 

Typedefs

typedef struct tcp_conn_struct tcp_conn_type
 
typedef struct tcp_set_struct tcp_set_type
 

Functions

tcp_conn_typetcp_conn_create (allocator_type *allocator)
 
tcp_set_typetcp_set_create (allocator_type *allocator)
 
void tcp_conn_ready (tcp_conn_type *tcp)
 
int tcp_conn_read (tcp_conn_type *tcp)
 
int tcp_conn_write (tcp_conn_type *tcp)
 
void tcp_set_cleanup (tcp_set_type *set, allocator_type *allocator)
 

Macro Definition Documentation

#define TCPSET_MAX   50

TCP connections.

Definition at line 42 of file tcpset.h.

Referenced by tcp_set_cleanup(), and tcp_set_create().

Typedef Documentation

tcp connection.

Definition at line 48 of file tcpset.h.

typedef struct tcp_set_struct tcp_set_type

Definition at line 65 of file tcpset.h.

Function Documentation

tcp_conn_type* tcp_conn_create ( allocator_type allocator)

Create a tcp connection.

Parameters
[in]allocatormemory allocator
Returns
tcp_conn_type* TCP connection.

Create a tcp connection.

Definition at line 45 of file tcpset.c.

References allocator_alloc(), allocator_deallocate(), buffer_create(), tcp_conn_struct::fd, tcp_conn_struct::msglen, tcp_conn_struct::packet, PACKET_BUFFER_SIZE, and tcp_conn_struct::total_bytes.

Referenced by tcp_set_create().

int tcp_conn_read ( tcp_conn_type tcp)
void tcp_conn_ready ( tcp_conn_type tcp)

Make tcp connection ready for reading.

Parameters
[in]tcptcp connection

Definition at line 96 of file tcpset.c.

References buffer_clear(), tcp_conn_struct::msglen, ods_log_assert, tcp_conn_struct::packet, and tcp_conn_struct::total_bytes.

int tcp_conn_write ( tcp_conn_type tcp)
void tcp_set_cleanup ( tcp_set_type set,
allocator_type allocator 
)

Clean up set of tcp connections.

Parameters
[in]setset of tcp connections
[in]allocatormemory allocator

Clean up set of tcp connections.

Definition at line 251 of file tcpset.c.

References allocator_deallocate(), tcp_set_struct::tcp_conn, and TCPSET_MAX.

Referenced by xfrhandler_cleanup().

tcp_set_type* tcp_set_create ( allocator_type allocator)

Create a set of tcp connections.

Parameters
[in]allocatormemory allocator
Returns
tcp_set_type* set of tcp connection.

Create a set of tcp connections.

Definition at line 74 of file tcpset.c.

References allocator_alloc(), tcp_set_struct::tcp_conn, tcp_conn_create(), tcp_set_struct::tcp_count, tcp_set_struct::tcp_waiting_first, tcp_set_struct::tcp_waiting_last, and TCPSET_MAX.

Referenced by xfrhandler_create().