*cpp = clp;
}
-/* if canonical is set, then we *know* this is already a canonical name
- * so hostname lookup is avoided.
- * This is used when reading /proc/fs/nfs/exports
+/**
+ * client_lookup - look for @hname in our list of cached nfs_clients
+ * @hname: '\0'-terminated ASCII string containing hostname to look for
+ * @canonical: if set, @hname is known to be canonical DNS name
+ *
+ * Returns pointer to a matching or freshly created nfs_client. NULL
+ * is returned if some problem occurs.
*/
nfs_client *
client_lookup(char *hname, int canonical)
return new;
}
+/**
+ * client_release - drop a reference to an nfs_client record
+ *
+ */
void
client_release(nfs_client *clp)
{
clp->m_count--;
}
+/**
+ * client_freeall - deallocate all nfs_client records
+ *
+ */
void
client_freeall(void)
{
return 0;
}
+/**
+ * client_gettype - determine type of nfs_client given an identifier
+ * @ident: '\0'-terminated ASCII string containing a client identifier
+ *
+ * Returns the type of nfs_client record that would be used for
+ * this client.
+ */
int
client_gettype(char *ident)
{
endexportent();
}
-/*
- * Create an in-core export struct from an export entry.
+/**
+ * export_create - create an in-core nfs_export record from an export entry
+ * @xep: export entry to lookup
+ * @canonical: if set, e_hostname is known to be canonical DNS name
+ *
+ * Returns a freshly instantiated export record, or NULL if
+ * a problem occurred.
*/
nfs_export *
export_create(struct exportent *xep, int canonical)
return NULL;
}
-/*
- * Search hash table for export entry.
- */
+/**
+ * export_lookup - search hash table for export entry
+ * @hname: '\0'-terminated ASCII string containing client hostname to look for
+ * @path: '\0'-terminated ASCII string containing export path to look for
+ * @canonical: if set, @hname is known to be canonical DNS name
+ *
+ * Returns a pointer to nfs_export record matching @hname and @path,
+ * or NULL if the export was not found.
+ */
nfs_export *
-export_lookup(char *hname, char *path, int canonical)
+export_lookup(char *hname, char *path, int canonical)
{
nfs_client *clp;
nfs_export *exp;