Listing 7. The Engine of burp.c
struct proc_dir_entry {
unsigned short low_ino; /* inode number for the file */
unsigned short namelen; /* lenght of filename */
const char *name; /* the filename itself */
mode_t mode; /* mode (and type) of file */
nlink_t nlink; /* number of links (1 for files) */
uid_t uid; /* owner */
gid_t gid; /* group */
unsigned long size; /* size, can be 0 if not relevant */
struct inode_operations * ops; /* inode ops for this file */
int (*get_info)(char *, char **, off_t, int, int); /* read data */
void (*fill_inode)(struct inode *); /* fill missing inode info */
struct proc_dir_entry *next, *parent, *subdir; /* internal use */
void *data; /* used in sysctl */
};
Copyright © 1994 - 2019 Linux Journal. All rights reserved.