ISC DHCP  4.3.3
A reference DHCPv4 and DHCPv6 implementation
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, 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

#define OMAPI_HANDLE_TABLE_SIZE   120

Definition at line 229 of file omapip_p.h.

#define OMAPI_OP_DELETE   6

Definition at line 94 of file omapip_p.h.

#define OMAPI_OP_NOTIFY   4

Definition at line 92 of file omapip_p.h.

#define OMAPI_OP_OPEN   1

Definition at line 89 of file omapip_p.h.

#define OMAPI_OP_REFRESH   2

Definition at line 90 of file omapip_p.h.

#define OMAPI_OP_STATUS   5

Definition at line 93 of file omapip_p.h.

#define OMAPI_OP_UPDATE   3

Definition at line 91 of file omapip_p.h.

#define OMAPI_PROTOCOL_VERSION   100

Definition at line 87 of file omapip_p.h.

#define SIG_MODE_ALL   (SIG_MODE_INIT|SIG_MODE_UPDATE|SIG_MODE_FINAL)

Definition at line 74 of file omapip_p.h.

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

Definition at line 73 of file omapip_p.h.

#define SIG_MODE_INIT   1 /* initalize digest */

Definition at line 71 of file omapip_p.h.

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

Definition at line 72 of file omapip_p.h.

Typedef Documentation

Enumeration Type Documentation

Enumerator
omapi_connection_unconnected 
omapi_connection_connecting 
omapi_connection_connected 
omapi_connection_disconnecting 
omapi_connection_closed 

Definition at line 96 of file omapip_p.h.

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 104 of file omapip_p.h.

Function Documentation

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

Definition at line 176 of file errwarn.c.

int int int log_debug ( const char *  ,
  ... 
)
int log_error ( const char *  ,
  ... 
)
void log_fatal ( const char *  ,
  ... 
)
int int log_info ( const char *  ,
  ... 
)
isc_result_t ns_rcode_to_isc ( int  )
OMAPI_ARRAY_TYPE_DECL ( omapi_listener  ,
omapi_listener_object_t   
)
OMAPI_ARRAY_TYPE_DECL ( omapi_connection  ,
omapi_connection_object_t   
)
void omapi_buffer_trace_setup ( void  )
void omapi_connection_register ( omapi_connection_object_t ,
const char *  ,
int   
)
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 827 of file connection.c.

void omapi_connection_trace_setup ( void  )
isc_result_t omapi_handle_clear ( omapi_handle_t  )

Definition at line 299 of file handle.c.

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 274 of file listener.c.

void omapi_listener_trace_setup ( void  )
OMAPI_OBJECT_ALLOC_DECL ( omapi_protocol  ,
omapi_protocol_object_t  ,
omapi_type_protocol   
)
omapi_type_protocol_listener OMAPI_OBJECT_ALLOC_DECL ( omapi_connection  ,
omapi_connection_object_t  ,
omapi_type_connection   
)
isc_result_t uerr2isc ( int  )

Definition at line 37 of file toisc.c.

Variable Documentation

void ISC_DHCP_NORETURN

Definition at line 285 of file omapip_p.h.

void(* log_cleanup) (void)

Definition at line 46 of file errwarn.c.

int log_perror

Definition at line 44 of file errwarn.c.

Definition at line 246 of file omapip_p.h.

omapi_message_object_t* omapi_registered_messages