summaryrefslogtreecommitdiff
path: root/lib/include/radsec/radsec.h
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2011-03-21 13:33:22 +0100
committerLinus Nordberg <linus@nordu.net>2011-03-21 13:33:22 +0100
commit217d24060890986d38848e0a9fd68ae6e7d1727f (patch)
treec198d491ae8d4da1965dd295d56e9d84eeee12e1 /lib/include/radsec/radsec.h
parentab01223c4583cb5da93046b05baddc75a3b27bc8 (diff)
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.
Diffstat (limited to 'lib/include/radsec/radsec.h')
-rw-r--r--lib/include/radsec/radsec.h24
1 files changed, 18 insertions, 6 deletions
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