diff options
author | Fritz Elfert <felfert@to.com> | 2000-10-09 19:14:34 +0000 |
---|---|---|
committer | Fritz Elfert <felfert@to.com> | 2000-10-09 19:14:34 +0000 |
commit | 55cd25850a312a0b61192ba455908a8bcfe0152b (patch) | |
tree | bec49f9270c12b37bd44f6734bcbbfdeec933622 /plpnfsd/builtins.h | |
parent | 84bfdac1c9c1d6c82141fbe9f28861a127b9a22b (diff) | |
download | plptools-55cd25850a312a0b61192ba455908a8bcfe0152b.tar.gz plptools-55cd25850a312a0b61192ba455908a8bcfe0152b.tar.bz2 plptools-55cd25850a312a0b61192ba455908a8bcfe0152b.zip |
Added process-stuff in procfs.
Added a check for a protocol "psion" in /etc/services
Diffstat (limited to 'plpnfsd/builtins.h')
-rw-r--r-- | plpnfsd/builtins.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/plpnfsd/builtins.h b/plpnfsd/builtins.h index 64b2823..644f18b 100644 --- a/plpnfsd/builtins.h +++ b/plpnfsd/builtins.h @@ -5,7 +5,21 @@ #ifndef _BUILTINS_H_ #define _BUILTINS_H_ +struct builtin_node_t; + +typedef struct builtin_child_t { + struct builtin_child_t *next; + struct builtin_node_t *node; +} builtin_child; + +/** + * Support for procfs-like builtin virtual files/directories + */ typedef struct builtin_node_t { + struct builtin_node_t *next; + struct builtin_node_t *parent; + builtin_child *childs; + char *private_data; char *name; unsigned long flags; long attr; @@ -14,20 +28,27 @@ typedef struct builtin_node_t { long (*read)(struct builtin_node_t *node, char *buf, unsigned long offset, long len); long (*write)(struct builtin_node_t *node, char *buf, unsigned long offset, long len); long (*sattr)(struct builtin_node_t *node, unsigned long sa, unsigned long da); + long (*getlinks)(struct builtin_node_t *node); + long (*getdents)(struct builtin_node_t *node, dentry **entries); } builtin_node; #define BF_EXISTS_ALWAYS 1 #define BF_NOCACHE 2 +#define BF_ISPROCESS 4 /** * Register a builtin handler for an entry in /proc */ -extern int register_builtin(builtin_node *); +builtin_node *register_builtin(char *parent, builtin_node *node); /** * Deregister a previously registered handler. */ -extern int unregister_builtin(char *); +extern int unregister_builtin(builtin_node *); + +extern char *builtin_path(builtin_node *node); +extern long generic_getlinks(builtin_node *node); +extern long generic_getdents(builtin_node *node, dentry **entries); #endif /* _BUILTINS_H_ */ |