equal
deleted
inserted
replaced
44 /** |
44 /** |
45 * Set a configuration option with the given name and value, given by the user. Configuration settings are not |
45 * Set a configuration option with the given name and value, given by the user. Configuration settings are not |
46 * regarded as unique-per-name, but rather, several invocations of 'conf' with the same name and different values |
46 * regarded as unique-per-name, but rather, several invocations of 'conf' with the same name and different values |
47 * could set up a multitude of things. |
47 * could set up a multitude of things. |
48 * |
48 * |
49 * XXX: make value a non-modifyable string |
49 * The given value is either a NUL-terminated string value (which may be mutated, using e.g. strsep), or NULL if |
|
50 * no value was given (flag option). |
50 * |
51 * |
51 * @param ctx the module's context pointer as returned by init |
52 * @param ctx the module's context pointer as returned by init |
52 * @param name the name of the configuration setting |
53 * @param name the name of the configuration setting |
53 * @param value the value of the configuration setting |
54 * @param value the value of the configuration setting |
54 * @param err returned error info |
55 * @param err returned error info |
130 * @param err return error info |
131 * @param err return error info |
131 */ |
132 */ |
132 err_t module_load (struct modules *modules, struct module **module_ptr, const struct module_info *info, struct error_info *err); |
133 err_t module_load (struct modules *modules, struct module **module_ptr, const struct module_info *info, struct error_info *err); |
133 |
134 |
134 /** |
135 /** |
|
136 * Lookup a module by name |
|
137 * |
|
138 * @param modules the modules state |
|
139 * @param name the module name to get |
|
140 * @return the module struct, or NULL if not found |
|
141 */ |
|
142 struct module* module_get (struct modules *modules, const char *name); |
|
143 |
|
144 /** |
135 * Set a module configuration option |
145 * Set a module configuration option |
136 */ |
146 */ |
137 err_t module_conf (struct module *module, const char *name, char *value, struct error_info *err); |
147 err_t module_conf (struct module *module, const char *name, char *value, struct error_info *err); |
138 |
148 |
139 /** |
149 /** |