This commit is contained in:
huoji
2023-05-07 22:49:11 +08:00
parent e8a3b9fa98
commit b00e51fdc7
38 changed files with 860 additions and 954 deletions

View File

@@ -11,6 +11,8 @@ extern int safe_duck_open(struct inode *inode, struct file *filep);
extern int safe_duck_release(struct inode *inode, struct file *file);
extern ssize_t safe_duck_read(struct file *file, char __user *buf, size_t count,
loff_t *pos);
extern ssize_t safe_duck_write(struct file *filp, const char __user *buf,
size_t count, loff_t *f_pos);
struct _driver_dev_build {
int major;
int minor;
@@ -18,6 +20,11 @@ struct _driver_dev_build {
dev_t devid; // device num
struct class *class; // class
struct device *device; // device
bool init_chrdev_region;
bool init_cdev_add;
bool init_device_create;
bool init_netfilter;
bool init_hashmap;
};
extern struct nf_hook_ops g_network_hook_ops;
extern struct file_operations g_fops;