*
* @param[in] _a pointer to first structure.
* @param[in] _b pointer to second structure.
- * @param[in] _filed within the structs to compare.
+ * @param[in] _field within the structs to compare.
* @return The result of the comparison.
*/
#define CMP_RETURN(_a, _b, _field) \
*
* Binds as the administrative user and attempts to modify an LDAP object.
*
+ * @param[out] msgid LDAP message ID.
* @param[in] request Current request.
* @param[in,out] pconn to use. May change as this function calls functions which auto re-connect.
* @param[in] dn of the object to modify.
/** Allocate a new search object
*
- * @param[in] ctx to allocate query in.
+ * @param[in] ctx to allocate query in.
+ * @param[in] base_dn for the search.
+ * @param[in] scope of the search.
+ * @param[in] filter for the search
+ * @param[in] attrs to request.
+ * @param[in] serverctrls Search controls to pass to the server. May be NULL.
+ * @param[in] clientctrls Client controls. May be NULL.
*/
fr_ldap_query_t *fr_ldap_search_alloc(TALLOC_CTX *ctx,
char const *base_dn, int scope, char const *filter, char const * const * attrs,
* We check all the possible referrals and look for one where there already
* is an active trunk connection.
*
- * @param query whose result was one or more referral URLs
+ * @param t Thread running the query.
+ * @param request related to the query.
+ * @param query whose result was one or more referral URLs.
* @return
* - 0 on success.
* - < 0 on failure.
* new trunks are launched with watchers to send the query on the first
* active trunk.
*
- * @param query whose referrals are being chased
+ * @param t Thread running the query.
+ * @param request the query relates to.
+ * @param query whose referrals are being chased.
* @return
* - 0 on success.
* - < 0 on failure.
*
* @param[in] node to set fmt for.
* @param[in] fmt talloced buffer to set as the fmt string.
+ * @param[in] len of fmt string.
*/
void xlat_exp_set_name(xlat_exp_t *node, char const *fmt, size_t len)
{
* @param[in,out] list value boxes provided as input.
* List will be modified in accordance to rules
* provided in the args array.
+ * @param[in] request being processed.
* @param[in] func to call
*/
static inline CC_HINT(always_inline)
/** Perform a regular expressions comparison between two operands
*
+ * @param[in] ctx to allocate resulting box in.
* @param[in] request The current request.
* @param[in] in list of item or items
* @param[in,out] preg Pointer to pre-compiled or runtime-compiled
* The caller should only free the `regex_t *` if it
* compiled it, and the pointer has not been set to NULL
* when this function returns.
+ * @param[out] out Where result is written.
* @param[in] op the operation to perform.
* @return
* - -1 on failure.
/** Set a print routine for an xlat function.
*
* @param[in] xlat to set
+ * @param[in] func for printing
*/
static inline void xlat_print_set(xlat_t *xlat, xlat_print_t func)
{
/** Set a resolve routine for an xlat function.
*
* @param[in] xlat to set
+ * @param[in] func to resolve xlat.
*/
static inline void xlat_resolve_set(xlat_t *xlat, xlat_resolve_t func)
{
/** Set a resolve routine for an xlat function.
*
* @param[in] xlat to set
+ * @param[in] func to purify xlat
*/
static inline void xlat_purify_set(xlat_t *xlat, xlat_purify_t func)
{
/** Add a free function to the global free list
*
- * @param[in] func to call.
- * @param[in] uctx to pass to func.
+ * @param[in] _func to call.
+ * @param[in] _uctx to pass to func.
* @return
* - 0 on success.
* - -1 on failure.
/** Create a function local and thread local extensible dbuff
*
- * @param[out] _dbuff_out Where to write a pointer to the thread local dbuff
+ * @param[out] _out Where to write a pointer to the thread local dbuff
* @param[in] _init Initial size for the dbuff buffer.
* @param[in] _max Maximum size of the dbuff buffer.
*/
/** Copy exactly _inlen bytes into dbuff or marker returning if there's insufficient space
* @copydetails fr_dbuff_in_memcpy
*/
-#define FR_DBUFF_IN_MEMCPY_RETURN(_out, _in, _inlen) FR_DBUFF_RETURN(fr_dbuff_in_memcpy, _out, _in, _inlen)
+#define FR_DBUFF_IN_MEMCPY_RETURN(_dbuff_or_marker, _in, _inlen) FR_DBUFF_RETURN(fr_dbuff_in_memcpy, _dbuff_or_marker, _in, _inlen)
/** Internal function - do not call directly
*
*
* @copydetails fr_dbuff_in
*/
-#define FR_DBUFF_IN_RETURN(_out, _in) FR_DBUFF_RETURN(fr_dbuff_in, _out, _in)
+#define FR_DBUFF_IN_RETURN(_dbuff_or_marker, _in) FR_DBUFF_RETURN(fr_dbuff_in, _dbuff_or_marker, _in)
/** Internal function - do not call directly
* @private
*
* @copydetails fr_dbuff_out_memcpy
*/
-#define FR_DBUFF_OUT_MEMCPY_RETURN(_out, _in, _outlen) FR_DBUFF_RETURN(fr_dbuff_out_memcpy, _out, _in, _outlen)
+#define FR_DBUFF_OUT_MEMCPY_RETURN(_out, _dbuff_or_marker, _outlen) FR_DBUFF_RETURN(fr_dbuff_out_memcpy, _out, _dbuff_or_marker, _outlen)
/** @cond */
/** Define integer encoding functions
*
* @copydetails fr_dbuff_out
*/
-#define FR_DBUFF_OUT_RETURN(_out, _in) FR_DBUFF_RETURN(fr_dbuff_out, _out, _in)
+#define FR_DBUFF_OUT_RETURN(_out, _dbuff_or_marker) FR_DBUFF_RETURN(fr_dbuff_out, _out, _dbuff_or_marker)
/** Internal function - do not call directly
* @private
/** Internal function to get the next item
*
* @param[in] cursor to operate on.
+ * @param[in] iter function.
* @param[in] current attribute.
* @return
* - The next attribute.
/** Initialise a cursor with a custom iterator
*
* @param[in] _cursor to initialise.
- * @param[in] _head of item list.
+ * @param[in] _list to iterate over.
* @param[in] _iter function.
* @param[in] _peek function. If NULL _iter will be used for peeking.
* @param[in] _iter_uctx _iter function _uctx.
+ * @param[in] _insert function.
+ * @param[in] _remove function.
+ * @param[in] _mod_uctx _insert and _remove function _uctx.
* @return
* - NULL if _head does not point to any items, or the iterator matches no items
* in the current list.
* - #FR_DLIST_ENTRY
* - #FR_DLIST_TYPES
* - #FR_DLIST_FUNCS
+ * @param[in] _element_type Type of element in the dlists.
*
* @note This macro should be used inside the header for the area of code
* which will use type specific functions.
* @param[in] parent of sub TLVs.
* @param[in] data to parse.
* @param[in] data_len of the data to parse
+ * @param[in] decode_ctx ctx for decode function.
* @return
* <= 0 on error
* bytes successfully decoded on success (<= data_len)
* @param[in] value Value string. This is kept as a string until we know
* what type we want to transform it into.
* @param[in] value_len Length of the value string.
+ * @param[in] parent of this attribute.
* @return
* - 0 on success.
* - -1 on out of memory.
* @param[in] fctx Holds current dictionary parsing information.
* @param[in] filename this fixup relates to.
* @param[in] line this fixup relates to.
+ * @param[in] parent for the cloned attribute.
* @param[in] da The group dictionary attribute.
* @param[in] ref OID string representing what the group references.
* @param[in] ref_len Length of the reference string.
* and will be use the unknown da as its talloc parent.
*
* @param[in] ctx to alloc new attribute in.
+ * @param[out] err Where to write error codes.
* @param[out] out Where to write the head of the chain unknown
* dictionary attributes.
* @param[in] parent Attribute to use as the root for resolving OIDs in.
* @param[out] err Where to write error codes. Any error
* other than FR_DICT_ATTR_NOTFOUND will
* prevent resolution from continuing.
+ * @param[out] out Where to write resolved DA.
* @param[in] parent The dictionary root or other attribute to search from.
* @param[in] in Contains the string to resolve.
* @param[in] tt Terminal sequences to use to determine the portion
* be bound to the lifetime of an additional object.
*
* @param[in] dict to increase the reference count for.
+ * @param[in] dependent requesting the loading of the dictionary.
* @return
* - 0 on success.
* - -1 on error.
/** Process a dict_autoload element to load a protocol
*
* @param[in] to_load dictionary definition.
+ * @param[in] dependent that is loading this dictionary.
* @return
* - 0 on success.
* - -1 on failure.
/** Decrement the reference count on a previously loaded dictionary
*
* @param[in] to_free previously loaded dictionary to free.
+ * @param[in] dependent that originally allocated this dictionary
*/
int _fr_dict_autofree(fr_dict_autoload_t const *to_free, char const *dependent)
{
* @param[in] dbuff Buffer where labels are written
* @param[in] compression Whether or not to do DNS label compression.
* @param[in] value to encode.
+ * @param[in] lb label tracking data structure.
* @return
* - >0 the number of bytes written to the dbuff
* - 0 could not encode anything, an error has occurred.
* @param[in] depth in the da_stack.
* @param[in,out] cursor Current attribute we're encoding.
* @param[in] encode_ctx Containing DHCPv4 dictionary.
+ * @param[in] encode_value Function to perform encoding of a single value.
* @return
* - >0 length of data encoded.
* - 0 if we ran out of space.
/** Called when a timer event fires
*
* @param[in] now The current time.
+ * @param[in] el Event list the timer event was inserted into.
* @param[in] uctx User ctx passed to #fr_event_timer_in or #fr_event_timer_at.
*/
typedef void (*fr_event_timer_cb_t)(fr_event_list_t *el, fr_time_t now, void *uctx);
*
* @note This is the only way to use a dcursor in non-const mode with fr_pair_list_t.
*
- * @param[out] cursor to initialise.
- * @param[in] list to iterate over.
- * @param[in] iter Iterator to use when filtering pairs.
- * @param[in] uctx To pass to iterator.
+ * @param[out] _cursor to initialise.
+ * @param[in] _list to iterate over.
+ * @param[in] _iter Iterator to use when filtering pairs.
+ * @param[in] _uctx To pass to iterator.
* @return
* - NULL if src does not point to any items.
* - The first pair in the list.
*
* @note This is the only way to use a dcursor in non-const mode with fr_pair_list_t.
*
- * @param[out] cursor to initialise.
- * @param[in] list to iterate over.
+ * @param[out] _cursor to initialise.
+ * @param[in] _list to iterate over.
* @return
* - NULL if src does not point to any items.
* - The first pair in the list.
/** Initialise a cursor that will return only attributes matching the specified #fr_dict_attr_t
*
- * @param[in] cursor to initialise.
- * @param[in] list to iterate over.
- * @param[in] da to search for.
+ * @param[in] _cursor to initialise.
+ * @param[in] _list to iterate over.
+ * @param[in] _da to search for.
* @return
* - The first matching pair.
* - NULL if no pairs match.
/** Initialise a cursor that will return only attributes descended from the specified #fr_dict_attr_t
*
- * @param[in] cursor to initialise.
- * @param[in] list to iterate over.
- * @param[in] da who's decentness to search for.
+ * @param[in] _cursor to initialise.
+ * @param[in] _list to iterate over.
+ * @param[in] _da who's decentness to search for.
* @return
* - The first matching pair.
* - NULL if no pairs match.
* If ctx is freed, tree will free any nodes, calling the
* free function if set.
* @param[in] _type of item being stored in the tree, e.g. fr_value_box_t.
- * @param[in] _field Containing the #fr_rb_node_t within item being stored.
* @param[in] _data_cmp Callback to compare node data.
* @param[in] _data_free Optional function used to free data if tree nodes are
* deleted or replaced.
* If ctx is freed, tree will free any nodes, calling the
* free function if set.
* @param[in] _type of item being stored in the tree, e.g. fr_value_box_t.
- * @param[in] _field Containing the #fr_rb_node_t within item being stored.
* @param[in] _data_cmp Callback to compare node data.
* @param[in] _data_free Optional function used to free data if tree nodes are
* deleted or replaced.
/** Brute force search a sorted or ordered ptr table, assuming the pointers are strings
*
* @param[in] table to search in.
+ * @param[in] table_len Number of elements in the table.
* @param[in] str_val to compare against the ptr field.
* @param[in] def default value.
*/
/** Convert a delta to a timeval
*
- * @param[in] delta in nanoseconds.
+ * @param[in] _delta in nanoseconds.
*/
#define fr_time_delta_to_timeval(_delta) \
(struct timeval){ \
/** Convert a delta to a timespec
*
- * @param[in] delta in nanoseconds.
+ * @param[in] _delta in nanoseconds.
*/
#define fr_time_delta_to_timespec(_delta)\
(struct timespec){ \
/** Allocate a trie
*
- * @param ctx The talloc ctx
- * @param get_key The "get key from object" function.
+ * @param ctx The talloc ctx.
+ * @param get_key The "get key from object" function.
+ * @param free_data Callback to free data.
* @return
* - NULL on error
* - fr_trie_node_t on success
*
* @param[out] dst where to write parsed value.
* @param[in] dst_type type of integer to convert string to.
+ * @param[in] dst_enumv Enumeration values.
* @param[in] in String to convert to integer.
+ * @param[in] rules for parsing string.
* @param[in] tainted Whether the value came from a trusted source.
* @return
* - >= 0 on success (number of bytes parsed).
*
* @param[in] sync message was associated with.
* @param[in] msg containing an entry to process.
+ * @param[in] ctrls unused LDAP controls
* @return
* - 0 on success.
* - -1 on failure.
*
* @param[in] ctx to allocate the sync state in.
* @param[in] conn which the sync will run on.
+ * @param[in] inst module instance for the sync.
+ * @param[in] sync_no number of the sync in the array of configs.
* @param[in] config for the sync.
* @return new sync state.
*/
* @param[in] inst Instance of rlm_detail.
* @param[in] request The current request.
* @param[in] packet associated with the request (request, reply...).
+ * @param[in] list of pairs to write.
* @param[in] compat Write out entry in compatibility mode.
*/
static int detail_write(FILE *out, rlm_detail_t const *inst, request_t *request,
* @param[in] attrs Additional attributes to retrieve, may be NULL.
* @param[in] force Query even if the User-DN already exists.
* @param[out] result Where to write the result, may be NULL in which case result is discarded.
+ * @param[out] handle on which the LDAP query is run.
* @param[out] rcode The status of the operation, one of the RLM_MODULE_* codes.
* @return The user's DN or NULL on error.
*/
* Convert Lua values back to fr_pair_ts. How the Lua value is converted is dependent
* on the type of the DA.
*
+ * @param[in] ctx To allocate new fr_pair_t in.
* @param[out] out Where to write a pointer to the new fr_pair_t.
* @param[in] inst the current instance.
* @param[in] request the current request.