#include <isc/lang.h>
#include <isc/buffer.h>
#include <isccc/types.h>
Go to the source code of this file.
Definition in file cc.h.
#define ISCCC_ALG_UNKNOWN 0 |
#define ISCCC_ALG_HMACMD5 157 |
Definition at line 48 of file cc.h.
Referenced by isccc_cc_towire(), parse_config(), sign(), and verify().
#define ISCCC_ALG_HMACSHA1 161 |
#define ISCCC_ALG_HMACSHA224 162 |
#define ISCCC_ALG_HMACSHA256 163 |
#define ISCCC_ALG_HMACSHA384 164 |
#define ISCCC_ALG_HMACSHA512 165 |
#define ISCCC_CCMSGTYPE_BINARYDATA 0x01 |
Message Type Binary Data.
Definition at line 61 of file cc.h.
Referenced by value_fromwire(), and value_towire().
#define ISCCC_CCMSGTYPE_TABLE 0x02 |
Message Type Table.
Definition at line 63 of file cc.h.
Referenced by value_fromwire(), and value_towire().
#define ISCCC_CCMSGTYPE_LIST 0x03 |
Message Type List.
Definition at line 65 of file cc.h.
Referenced by value_fromwire(), and value_towire().
isc_result_t isccc_cc_towire | ( | isccc_sexpr_t * | alist, | |
isc_buffer_t ** | buffer, | |||
isc_uint32_t | algorithm, | |||
isccc_region_t * | secret | |||
) |
Send to Wire.
Definition at line 345 of file cc.c.
References auth_hmd5, auth_hsha, HMD5_OFFSET, HSHA_OFFSET, isc_buffer_putmem, isc_buffer_putuint32, isc_buffer_reserve(), isc_buffer_used, ISC_R_NOSPACE, ISC_R_SUCCESS, ISCCC_ALG_HMACMD5, isccc_alist_delete(), sign(), and table_towire().
Referenced by control_recvmessage(), rndc_connected(), and rndc_recvnonce().
isc_result_t isccc_cc_fromwire | ( | isccc_region_t * | source, | |
isccc_sexpr_t ** | alistp, | |||
isc_uint32_t | algorithm, | |||
isccc_region_t * | secret | |||
) |
Get From Wire.
Definition at line 657 of file cc.c.
References GET32, ISC_R_UNEXPECTEDEND, ISCCC_R_UNKNOWNVERSION, REGION_SIZE, isccc_region::rstart, table_fromwire(), and version.
Referenced by control_recvmessage(), rndc_recvdone(), and rndc_recvnonce().
isc_result_t isccc_cc_createmessage | ( | isc_uint32_t | version, | |
const char * | from, | |||
const char * | to, | |||
isc_uint32_t | serial, | |||
isccc_time_t | now, | |||
isccc_time_t | expires, | |||
isccc_sexpr_t ** | alistp | |||
) |
Create Message.
Definition at line 732 of file cc.c.
References createmessage(), and ISC_TRUE.
Referenced by isccc_cc_createresponse(), rndc_connected(), and rndc_recvnonce().
isc_result_t isccc_cc_createack | ( | isccc_sexpr_t * | message, | |
isc_boolean_t | ok, | |||
isccc_sexpr_t ** | ackp | |||
) |
Create Acknowledgment.
Definition at line 741 of file cc.c.
References createmessage(), ISC_FALSE, ISC_R_FAILURE, ISC_R_NOMEMORY, ISC_R_SUCCESS, isccc_alist_lookup(), isccc_cc_definestring(), isccc_cc_lookupstring(), isccc_cc_lookupuint32(), isccc_sexpr_free(), REQUIRE, and serial.
isc_boolean_t isccc_cc_isack | ( | isccc_sexpr_t * | message | ) |
Is Ack?
Definition at line 793 of file cc.c.
References ISC_FALSE, ISC_R_SUCCESS, ISC_TRUE, isccc_alist_lookup(), and isccc_cc_lookupstring().
isc_boolean_t isccc_cc_isreply | ( | isccc_sexpr_t * | message | ) |
Is Reply?
Definition at line 806 of file cc.c.
References ISC_FALSE, ISC_R_SUCCESS, ISC_TRUE, isccc_alist_lookup(), and isccc_cc_lookupstring().
Referenced by control_recvmessage().
isc_result_t isccc_cc_createresponse | ( | isccc_sexpr_t * | message, | |
isccc_time_t | now, | |||
isccc_time_t | expires, | |||
isccc_sexpr_t ** | alistp | |||
) |
Create Response.
Definition at line 819 of file cc.c.
References ISC_R_FAILURE, ISC_R_NOMEMORY, ISC_R_SUCCESS, isccc_alist_lookup(), isccc_cc_createmessage(), isccc_cc_definestring(), isccc_cc_lookupstring(), isccc_cc_lookupuint32(), isccc_sexpr_free(), REQUIRE, and serial.
Referenced by control_recvmessage().
isccc_sexpr_t* isccc_cc_definestring | ( | isccc_sexpr_t * | alist, | |
const char * | key, | |||
const char * | str | |||
) |
Define String.
Definition at line 880 of file cc.c.
References DE_CONST, isccc_alist_definebinary(), r, isccc_region::rend, and isccc_region::rstart.
Referenced by control_recvmessage(), createmessage(), isccc_cc_createack(), isccc_cc_createresponse(), rndc_connected(), and rndc_recvnonce().
isccc_sexpr_t* isccc_cc_defineuint32 | ( | isccc_sexpr_t * | alist, | |
const char * | key, | |||
isc_uint32_t | i | |||
) |
Define uint 32.
Definition at line 893 of file cc.c.
References isccc_alist_definebinary(), r, isccc_region::rend, and isccc_region::rstart.
Referenced by control_recvmessage(), createmessage(), and rndc_recvnonce().
isc_result_t isccc_cc_lookupstring | ( | isccc_sexpr_t * | alist, | |
const char * | key, | |||
char ** | strp | |||
) |
Lookup String.
Definition at line 908 of file cc.c.
References ISC_R_EXISTS, ISC_R_NOTFOUND, ISC_R_SUCCESS, isccc_alist_assq(), isccc_sexpr_binaryp(), ISCCC_SEXPR_CDR, isccc_sexpr_tostring(), and REQUIRE.
Referenced by isccc_cc_checkdup(), isccc_cc_createack(), isccc_cc_createresponse(), isccc_cc_isack(), isccc_cc_isreply(), ns_control_docommand(), and rndc_recvdone().
isc_result_t isccc_cc_lookupuint32 | ( | isccc_sexpr_t * | alist, | |
const char * | key, | |||
isc_uint32_t * | uintp | |||
) |
Lookup uint 32.
Definition at line 929 of file cc.c.
References ISC_R_EXISTS, ISC_R_NOTFOUND, ISC_R_SUCCESS, isccc_alist_assq(), isccc_sexpr_binaryp(), ISCCC_SEXPR_CDR, and isccc_sexpr_tostring().
Referenced by control_recvmessage(), isccc_cc_createack(), isccc_cc_createresponse(), and rndc_recvnonce().
isc_result_t isccc_cc_createsymtab | ( | isccc_symtab_t ** | symtabp | ) |
Create Symbol Table.
Definition at line 980 of file cc.c.
References ISC_FALSE, isccc_symtab_create(), and symtab_undefine().
Referenced by ns_controls_create().
void isccc_cc_cleansymtab | ( | isccc_symtab_t * | symtab, | |
isccc_time_t | now | |||
) |
Clean up Symbol Table.
Definition at line 987 of file cc.c.
References isccc_symtab_foreach(), and symtab_clean().
Referenced by control_recvmessage().
isc_result_t isccc_cc_checkdup | ( | isccc_symtab_t * | symtab, | |
isccc_sexpr_t * | message, | |||
isccc_time_t | now | |||
) |
Check for Duplicates.
Definition at line 1007 of file cc.c.
References isccc_symvalue::as_uinteger, free(), has_whitespace(), INSIST, ISC_R_FAILURE, ISC_R_NOMEMORY, ISC_R_SUCCESS, isccc_alist_lookup(), isccc_cc_lookupstring(), isccc_symexists_reject, isccc_symtab_define(), ISCCC_SYMTYPE_CCDUP, and key.
Referenced by control_recvmessage().