From 217d24060890986d38848e0a9fd68ae6e7d1727f Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Mon, 21 Mar 2011 13:33:22 +0100 Subject: API AND CONFIG CHANGE: rs_context_create() doesn't take DICT any more. Use rs_context_create() to read FreeRADIUS dictionary, possibly by taking dict file from configuration file. CONFIG CHANGE: s/config/realm/g. --- lib/include/radsec/radsec.h | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'lib/include/radsec/radsec.h') diff --git a/lib/include/radsec/radsec.h b/lib/include/radsec/radsec.h index 6b0a69c..a35077c 100644 --- a/lib/include/radsec/radsec.h +++ b/lib/include/radsec/radsec.h @@ -91,18 +91,30 @@ struct rs_conn_callbacks { that the context must not be freed before all other libradsec objects have been freed. - \a ctx Address of pointer to a struct rs_context. This is the output. + \a ctx Address of pointer to a struct rs_context. This is the + output of this function. - \a dict Name of a FreeRADIUS dictionary. - - \return RSE_OK (0) on success, RSE_NOMEM on out of memory or - RSE_FR on FreeRADIUS initialization error. */ -int rs_context_create(struct rs_context **ctx, const char *dict); + \return RSE_OK (0) on success or RSE_NOMEM on out of memory. */ +int rs_context_create(struct rs_context **ctx); /** Free a context. Note that the context must not be freed before all other libradsec objects have been freed. */ void rs_context_destroy(struct rs_context *ctx); +/** Initialize FreeRADIUS dictionary needed for creating packets. + + \a ctx Context. + + \a dict Optional string with full path to FreeRADIUS dictionary. + If \a dict is NULL the path to the dictionary file is taken from + the "dictionary" configuration directive. Note that the + configuration file must be read prior to using this option (see \a + rs_context_read_config). + + \return RSE_OK (0) on success, RSE_NOMEM on memory allocation + error and RSE_FR on FreeRADIUS error. */ +int rs_context_init_freeradius_dict(struct rs_context *ctx, const char *dict); + /** Set allocation scheme to use. \a scheme is the allocation scheme to use, see \a rs_alloc_scheme. \return On success, RSE_OK (0) is returned. On error, !0 is returned and a struct \a rs_error is -- cgit v1.1