The method_nextentry Interface
int method_newentry (void *handlep, char *table_name, char *attrname, char *key);
The handlep parameter is a handle to the load module opened with the method_open interface. The key parameter refers to an entry in the named table. If it is NULL it refers to all entries in the table. The table_name parameter refers to one of the tables. The attrname parameter indicates the attribute name which the routine uses to determine what files need to be accessed.
method_nextentry locates the name of the next entry in a linear search through a file given the previous search entry name and the name of an attribute which selects a specific file.
method_nextentry returns 0 when the entry has been successfully created. On failure a value of -1 is returned and the global variable errno is set to indicate the cause. A value of EINVAL is used when an invalid table name has been specified, or if no attrname has been specified and the table is not one of these tables. A value of ENOSYS is used when creating an entry is not supported by the module. A value of EPERM is used when the invoker does not have permission to create an entry. A value of EEXIST is used when the entry already exists. A value of EROFS is used when the module was not opened for updates.