NSDISPATCH(3): Add rtems_nss_register_module()

This commit is contained in:
Sebastian Huber
2014-11-03 15:21:06 +01:00
parent f90fdf3b68
commit b94c5ecf82
2 changed files with 70 additions and 6 deletions

View File

@@ -215,7 +215,9 @@ typedef struct _ns_mod {
void *handle; /* handle from dlopen */
ns_mtab *mtab; /* method table */
unsigned int mtabsize; /* count of entries in method table */
#ifndef __rtems__
nss_module_unregister_fn unregister; /* called to unload module */
#endif /* __rtems__ */
} ns_mod;
#endif /* _NS_PRIVATE */
@@ -238,6 +240,22 @@ extern int _nsyylineno;
extern void _nsdbtdump(const ns_dbt *);
#endif
#endif /* _NS_PRIVATE */
#ifdef __rtems__
/**
* @brief Registers a name service module.
*
* @param[in] source The source identifier.
* @param[in] mtab The module table. This table will be claimed by the name
* service dispatcher.
* @param[in] mtabsize The module table entry count.
*
* @retval 0 Successful operation.
* @retval -1 An error occurred. The errno is set to indicate the error.
*/
int
rtems_nss_register_module(const char *source, ns_mtab *mtab,
unsigned int mtabsize);
#endif /* __rtems__ */
__END_DECLS