## libkmod-config libkmod-config — retrieve current libkmod configuration |

## Functions

struct kmod_config_iter * | kmod_config_get_blacklists ()
struct kmod_config_iter * | kmod_config_get_install_commands ()
struct kmod_config_iter * | kmod_config_get_remove_commands ()
struct kmod_config_iter * | kmod_config_get_aliases ()
struct kmod_config_iter * | kmod_config_get_options ()
struct kmod_config_iter * | kmod_config_get_softdeps ()
const char * | kmod_config_iter_get_key ()
const char * | kmod_config_iter_get_value ()
bool | kmod_config_iter_next ()
void | kmod_config_iter_free_iter ()

## Types and Values

struct | kmod_config_iter

## Description

## Functions

### kmod_config_get_blacklists ()

    struct kmod_config_iter *
    kmod_config_get_blacklists (const struct kmod_ctx *ctx);

Retrieve an iterator to deal with the blacklist maintained inside the library. See `kmod_config_iter_get_key()`, `kmod_config_iter_get_value()` and `kmod_config_iter_next()`. At least one call to `kmod_config_iter_next()` must be made to initialize the iterator and check if it's valid.

#### Parameters

ctx | kmod library context |

#### Returns

a new iterator over the blacklists or NULL on failure. Free it with `kmod_config_iter_free_iter()`.

### kmod_config_get_install_commands ()

    struct kmod_config_iter *
    kmod_config_get_install_commands (const struct kmod_ctx *ctx);

Retrieve an iterator to deal with the install commands maintained inside the library. See `kmod_config_iter_get_key()`, `kmod_config_iter_get_value()` and `kmod_config_iter_next()`. At least one call to `kmod_config_iter_next()` must be made to initialize the iterator and check if it's valid.

#### Parameters

ctx | kmod library context |

#### Returns

a new iterator over the install commands or NULL on failure. Free it with `kmod_config_iter_free_iter()`.

### kmod_config_get_remove_commands ()

    struct kmod_config_iter *
    kmod_config_get_remove_commands (const struct kmod_ctx *ctx);

Retrieve an iterator to deal with the remove commands maintained inside the library. See `kmod_config_iter_get_key()`, `kmod_config_iter_get_value()` and `kmod_config_iter_next()`. At least one call to `kmod_config_iter_next()` must be made to initialize the iterator and check if it's valid.

#### Parameters

ctx | kmod library context |

#### Returns

a new iterator over the remove commands or NULL on failure. Free it with `kmod_config_iter_free_iter()`.

### kmod_config_get_aliases ()

    struct kmod_config_iter *
    kmod_config_get_aliases (const struct kmod_ctx *ctx);

Retrieve an iterator to deal with the aliases maintained inside the library. See `kmod_config_iter_get_key()`, `kmod_config_iter_get_value()` and `kmod_config_iter_next()`. At least one call to `kmod_config_iter_next()` must be made to initialize the iterator and check if it's valid.

#### Parameters

ctx | kmod library context |

#### Returns

a new iterator over the aliases or NULL on failure. Free it with `kmod_config_iter_free_iter()`.

### kmod_config_get_options ()

    struct kmod_config_iter *
    kmod_config_get_options (const struct kmod_ctx *ctx);

Retrieve an iterator to deal with the options maintained inside the library. See `kmod_config_iter_get_key()`, `kmod_config_iter_get_value()` and `kmod_config_iter_next()`. At least one call to `kmod_config_iter_next()` must be made to initialize the iterator and check if it's valid.

#### Parameters

ctx | kmod library context |

#### Returns

a new iterator over the options or NULL on failure. Free it with `kmod_config_iter_free_iter()`.

### kmod_config_get_softdeps ()

    struct kmod_config_iter *
    kmod_config_get_softdeps (const struct kmod_ctx *ctx);

Retrieve an iterator to deal with the softdeps maintained inside the library. See `kmod_config_iter_get_key()`, `kmod_config_iter_get_value()` and `kmod_config_iter_next()`. At least one call to `kmod_config_iter_next()` must be made to initialize the iterator and check if it's valid.

#### Parameters

ctx | kmod library context |

#### Returns

a new iterator over the softdeps or NULL on failure. Free it with `kmod_config_iter_free_iter()`.

### kmod_config_iter_get_key ()

    const char *
    kmod_config_iter_get_key (const struct kmod_config_iter *iter);

When using a new allocated iterator, user must perform a call to `kmod_config_iter_next()` to initialize iterator's position and check if it's valid.

#### Parameters

iter | iterator over a certain configuration |

#### Returns

the key of the current configuration pointed by `iter` .

### kmod_config_iter_get_value ()

    const char *
    kmod_config_iter_get_value (const struct kmod_config_iter *iter);

When using a new allocated iterator, user must perform a call to `kmod_config_iter_next()` to initialize iterator's position and check if it's valid.

#### Parameters

iter | iterator over a certain configuration |

#### Returns

the value of the current configuration pointed by `iter` .

### kmod_config_iter_next ()

    bool
    kmod_config_iter_next (struct kmod_config_iter *iter);

Make `iter` point to the next item of a certain configuration. It's an automatically recycling iterator. When it reaches the end, false is returned; then if user wants to iterate again, it's sufficient to call this function once more.

#### Parameters

iter | iterator over a certain configuration |

#### Returns

true if next position of `iter` is valid or false if its end is reached.

### kmod_config_iter_free_iter ()

    void
    kmod_config_iter_free_iter (struct kmod_config_iter *iter);

Free resources used by the iterator.

#### Parameters

iter | iterator over a certain configuration |

## Types and Values

### struct kmod_config_iter

    struct kmod_config_iter;