OpenDNSSEC-signer  1.3.4
Data Structures | Typedefs | Enumerations | Functions
/build/buildd/opendnssec-1.3.4/signer/src/adapter/adapter.h File Reference
#include "config.h"
#include "adapter/adfile.h"
#include "shared/status.h"
#include <stdio.h>
Include dependency graph for adapter.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  adapter_data_union
struct  adapter_struct

Typedefs

typedef enum adapter_mode_enum adapter_mode
typedef union adapter_data_union adapter_data
typedef struct adapter_struct adapter_type

Enumerations

enum  adapter_mode_enum { ADAPTER_FILE = 1 }

Functions

ods_status adapter_init (adapter_type *adapter)
adapter_typeadapter_create (const char *str, adapter_mode type, int inbound)
int adapter_compare (adapter_type *a1, adapter_type *a2)
ods_status adapter_read (struct zone_struct *zone)
ods_status adapter_write (struct zone_struct *zone)
void adapter_cleanup (adapter_type *adapter)

Typedef Documentation

Definition at line 57 of file adapter.h.

Definition at line 50 of file adapter.h.

typedef struct adapter_struct adapter_type

Adapter.

Definition at line 63 of file adapter.h.


Enumeration Type Documentation

Adapter mode.

Enumerator:
ADAPTER_FILE 

Definition at line 46 of file adapter.h.


Function Documentation

void adapter_cleanup ( adapter_type adapter)

Clean up adapter.

Parameters:
[in]adapteradapter to cleanup

Clean up adapter.

Definition at line 220 of file adapter.c.

References adapter_struct::allocator, allocator_cleanup(), allocator_deallocate(), adapter_struct::configstr, and adapter_struct::data.

Referenced by zone_cleanup().

int adapter_compare ( adapter_type a1,
adapter_type a2 
)

Compare adapters. /param[in] a1 adapter 1 /param[in] a2 adapter 2 /return int 0 on equal, -1 if a1 < a2, 1 if a1 > a2

Compare adapters.

Definition at line 198 of file adapter.c.

References adapter_struct::configstr, adapter_struct::inbound, ods_strcmp(), and adapter_struct::type.

Referenced by zone_merge().

adapter_type* adapter_create ( const char *  str,
adapter_mode  type,
int  inbound 
)

Create new adapter.

Parameters:
[in]strconfiguration string
[in]typetype of adapter
[in]inboundinbound or not (thus outbound)
Returns:
adapter_type* created adapter

Create a new adapter.

Definition at line 79 of file adapter.c.

References adapter_struct::allocator, allocator_alloc(), allocator_cleanup(), allocator_create(), allocator_strdup(), adapter_struct::configstr, adapter_struct::data, adapter_struct::inbound, ods_log_assert, ods_log_error(), and adapter_struct::type.

Initialize adapter.

Parameters:
[in]adapteradapter /return ods_status stats

Initialize adapter.

Definition at line 52 of file adapter.c.

References ADAPTER_FILE, adfile_init(), adapter_struct::configstr, ods_log_assert, ods_log_error(), ODS_STATUS_ERR, and adapter_struct::type.

ods_status adapter_read ( struct zone_struct zone)

Read zone from input adapter. /param[in] zone zone /return ods_status stats

Definition at line 114 of file adapter.c.

References ADAPTER_FILE, adfile_read(), zone_struct::adinbound, adapter_struct::configstr, zone_struct::name, ods_log_assert, ods_log_error(), ods_log_verbose(), ODS_STATUS_ASSERT_ERR, ODS_STATUS_ERR, ODS_STATUS_OK, and adapter_struct::type.

Referenced by tools_input().

ods_status adapter_write ( struct zone_struct zone)