ISC DHCP 4.4.3-P1
A reference DHCPv4 and DHCPv6 implementation
 
Loading...
Searching...
No Matches
omapip_p.h File Reference
#include <sys/types.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <memory.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <ctype.h>
#include <time.h>
#include <dst/dst.h>
#include "result.h"
#include <omapip/convert.h>
#include <omapip/hash.h>
#include <omapip/omapip.h>
#include <omapip/trace.h>
#include <omapip/buffer.h>
#include <omapip/alloc.h>

Go to the source code of this file.

Data Structures

struct  omapi_protocol_header_t
 
struct  __omapi_message_object
 
struct  __omapi_remote_auth
 
struct  __omapi_protocol_object
 
struct  omapi_protocol_listener_object_t
 
struct  __omapi_listener_object
 
struct  __omapi_connection_object
 
struct  __omapi_io_object
 
struct  __omapi_generic_object
 
struct  __omapi_waiter_object
 
struct  __omapi_handle_table
 

Macros

#define SIG_MODE_INIT   1 /* initalize digest */
 
#define SIG_MODE_UPDATE   2 /* add data to digest */
 
#define SIG_MODE_FINAL   4 /* generate/verify signature */
 
#define SIG_MODE_ALL   (SIG_MODE_INIT|SIG_MODE_UPDATE|SIG_MODE_FINAL)
 
#define OMAPI_PROTOCOL_VERSION   100
 
#define OMAPI_OP_OPEN   1
 
#define OMAPI_OP_REFRESH   2
 
#define OMAPI_OP_UPDATE   3
 
#define OMAPI_OP_NOTIFY   4
 
#define OMAPI_OP_STATUS   5
 
#define OMAPI_OP_DELETE   6
 
#define OMAPI_HANDLE_TABLE_SIZE   120
 

Typedefs

typedef struct __omapi_message_object omapi_message_object_t
 
typedef struct __omapi_remote_auth omapi_remote_auth_t
 
typedef struct __omapi_protocol_object omapi_protocol_object_t
 
typedef struct __omapi_listener_object omapi_listener_object_t
 
typedef struct __omapi_connection_object omapi_connection_object_t
 
typedef struct __omapi_io_object omapi_io_object_t
 
typedef struct __omapi_generic_object omapi_generic_object_t
 
typedef struct __omapi_waiter_object omapi_waiter_object_t
 
typedef struct __omapi_handle_table omapi_handle_table_t
 

Enumerations

enum  omapi_connection_state_t {
  omapi_connection_unconnected , omapi_connection_connecting , omapi_connection_connected , omapi_connection_disconnecting ,
  omapi_connection_closed
}
 
enum  omapi_protocol_state_t {
  omapi_protocol_intro_wait , omapi_protocol_header_wait , omapi_protocol_signature_wait , omapi_protocol_name_wait ,
  omapi_protocol_name_length_wait , omapi_protocol_value_wait , omapi_protocol_value_length_wait
}
 

Functions

 OMAPI_OBJECT_ALLOC_DECL (omapi_protocol, omapi_protocol_object_t, omapi_type_protocol) OMAPI_OBJECT_ALLOC_DECL(omapi_protocol_listener
 
omapi_type_protocol_listener OMAPI_OBJECT_ALLOC_DECL (omapi_connection, omapi_connection_object_t, omapi_type_connection) OMAPI_OBJECT_ALLOC_DECL(omapi_listener
 
omapi_type_protocol_listener omapi_type_listener OMAPI_OBJECT_ALLOC_DECL (omapi_io, omapi_io_object_t, omapi_type_io_object) OMAPI_OBJECT_ALLOC_DECL(omapi_waiter
 
omapi_type_protocol_listener omapi_type_listener omapi_type_waiter OMAPI_OBJECT_ALLOC_DECL (omapi_generic, omapi_generic_object_t, omapi_type_generic) OMAPI_OBJECT_ALLOC_DECL(omapi_message
 
omapi_type_protocol_listener omapi_type_listener omapi_type_waiter omapi_type_message isc_result_t omapi_connection_sign_data (int mode, dst_key_t *key, void **context, const unsigned char *data, const unsigned len, omapi_typed_data_t **result)
 
isc_result_t omapi_listener_connect (omapi_connection_object_t **obj, omapi_listener_object_t *listener, int socket, struct sockaddr_in *remote_addr)
 
void omapi_listener_trace_setup (void)
 
void omapi_connection_trace_setup (void)
 
void omapi_buffer_trace_setup (void)
 
void omapi_connection_register (omapi_connection_object_t *, const char *, int)
 
 OMAPI_ARRAY_TYPE_DECL (omapi_listener, omapi_listener_object_t)
 
 OMAPI_ARRAY_TYPE_DECL (omapi_connection, omapi_connection_object_t)
 
isc_result_t omapi_handle_clear (omapi_handle_t)
 
void log_fatal (const char *,...) __attribute__((__format__(__printf__
 
int log_error (const char *,...) __attribute__((__format__(__printf__
 
int int log_info (const char *,...) __attribute__((__format__(__printf__
 
int int int log_debug (const char *,...) __attribute__((__format__(__printf__
 
int int int void do_percentm (char *obuf, size_t obufsize, const char *ibuf)
 
isc_result_t uerr2isc (int)
 
isc_result_t ns_rcode_to_isc (int)
 

Variables

 omapi_protocol_listener_object_t
 
int log_perror
 
void(* log_cleanup )(void)
 
void ISC_DHCP_NORETURN
 
omapi_message_object_tomapi_registered_messages
 

Macro Definition Documentation

◆ OMAPI_HANDLE_TABLE_SIZE

#define OMAPI_HANDLE_TABLE_SIZE   120

Definition at line 231 of file omapip_p.h.

◆ OMAPI_OP_DELETE

#define OMAPI_OP_DELETE   6

Definition at line 96 of file omapip_p.h.

◆ OMAPI_OP_NOTIFY

#define OMAPI_OP_NOTIFY   4

Definition at line 94 of file omapip_p.h.

◆ OMAPI_OP_OPEN

#define OMAPI_OP_OPEN   1

Definition at line 91 of file omapip_p.h.

◆ OMAPI_OP_REFRESH

#define OMAPI_OP_REFRESH   2

Definition at line 92 of file omapip_p.h.

◆ OMAPI_OP_STATUS

#define OMAPI_OP_STATUS   5

Definition at line 95 of file omapip_p.h.

◆ OMAPI_OP_UPDATE

#define OMAPI_OP_UPDATE   3

Definition at line 93 of file omapip_p.h.

◆ OMAPI_PROTOCOL_VERSION

#define OMAPI_PROTOCOL_VERSION   100

Definition at line 89 of file omapip_p.h.

◆ SIG_MODE_ALL

#define SIG_MODE_ALL   (SIG_MODE_INIT|SIG_MODE_UPDATE|SIG_MODE_FINAL)

Definition at line 76 of file omapip_p.h.

◆ SIG_MODE_FINAL

#define SIG_MODE_FINAL   4 /* generate/verify signature */

Definition at line 75 of file omapip_p.h.

◆ SIG_MODE_INIT

#define SIG_MODE_INIT   1 /* initalize digest */

Definition at line 73 of file omapip_p.h.

◆ SIG_MODE_UPDATE

#define SIG_MODE_UPDATE   2 /* add data to digest */

Definition at line 74 of file omapip_p.h.

Typedef Documentation

◆ omapi_connection_object_t

◆ omapi_generic_object_t

◆ omapi_handle_table_t

◆ omapi_io_object_t

◆ omapi_listener_object_t

◆ omapi_message_object_t

◆ omapi_protocol_object_t

◆ omapi_remote_auth_t

◆ omapi_waiter_object_t

Enumeration Type Documentation

◆ omapi_connection_state_t

Enumerator
omapi_connection_unconnected 
omapi_connection_connecting 
omapi_connection_connected 
omapi_connection_disconnecting 
omapi_connection_closed 

Definition at line 98 of file omapip_p.h.

◆ omapi_protocol_state_t

Enumerator
omapi_protocol_intro_wait 
omapi_protocol_header_wait 
omapi_protocol_signature_wait 
omapi_protocol_name_wait 
omapi_protocol_name_length_wait 
omapi_protocol_value_wait 
omapi_protocol_value_length_wait 

Definition at line 106 of file omapip_p.h.

Function Documentation

◆ do_percentm()

int int int void do_percentm ( char * obuf,
size_t obufsize,
const char * ibuf )

Definition at line 210 of file errwarn.c.

◆ log_debug()

int int int log_debug ( const char * ,
... )

◆ log_error()

int log_error ( const char * ,
... )

◆ log_fatal()

void log_fatal ( const char * ,
... )

◆ log_info()

int int log_info ( const char * ,
... )

◆ ns_rcode_to_isc()

isc_result_t ns_rcode_to_isc ( int )

◆ OMAPI_ARRAY_TYPE_DECL() [1/2]

OMAPI_ARRAY_TYPE_DECL ( omapi_connection ,
omapi_connection_object_t  )

◆ OMAPI_ARRAY_TYPE_DECL() [2/2]

OMAPI_ARRAY_TYPE_DECL ( omapi_listener ,
omapi_listener_object_t  )

◆ omapi_buffer_trace_setup()

void omapi_buffer_trace_setup ( void )

◆ omapi_connection_register()

void omapi_connection_register ( omapi_connection_object_t * ,
const char * ,
int  )

◆ omapi_connection_sign_data()

omapi_type_protocol_listener omapi_type_listener omapi_type_waiter omapi_type_message isc_result_t omapi_connection_sign_data ( int mode,
dst_key_t * key,
void ** context,
const unsigned char * data,
const unsigned len,
omapi_typed_data_t ** result )

Definition at line 808 of file connection.c.

◆ omapi_connection_trace_setup()

void omapi_connection_trace_setup ( void )

◆ omapi_handle_clear()

isc_result_t omapi_handle_clear ( omapi_handle_t h)

Definition at line 298 of file handle.c.

◆ omapi_listener_connect()

isc_result_t omapi_listener_connect ( omapi_connection_object_t ** obj,
omapi_listener_object_t * listener,
int socket,
struct sockaddr_in * remote_addr )

Definition at line 278 of file listener.c.

◆ omapi_listener_trace_setup()

void omapi_listener_trace_setup ( void )

◆ OMAPI_OBJECT_ALLOC_DECL() [1/4]

omapi_type_protocol_listener OMAPI_OBJECT_ALLOC_DECL ( omapi_connection ,
omapi_connection_object_t ,
omapi_type_connection  )

◆ OMAPI_OBJECT_ALLOC_DECL() [2/4]

◆ OMAPI_OBJECT_ALLOC_DECL() [3/4]

◆ OMAPI_OBJECT_ALLOC_DECL() [4/4]

OMAPI_OBJECT_ALLOC_DECL ( omapi_protocol ,
omapi_protocol_object_t ,
omapi_type_protocol  )

◆ uerr2isc()

isc_result_t uerr2isc ( int err)

Definition at line 37 of file toisc.c.

Variable Documentation

◆ ISC_DHCP_NORETURN

void ISC_DHCP_NORETURN

Definition at line 287 of file omapip_p.h.

◆ log_cleanup

void(* log_cleanup) (void) ( void )
extern

Definition at line 45 of file errwarn.c.

◆ log_perror

int log_perror
extern

Definition at line 43 of file errwarn.c.

◆ omapi_protocol_listener_object_t

omapi_protocol_listener_object_t

Definition at line 248 of file omapip_p.h.

◆ omapi_registered_messages

omapi_message_object_t* omapi_registered_messages
extern