The prototype of ioctl in linux driver modules is
int ioctl(struct inode *i, struct file *f, unsigned int cmd, unsigned long arg);
long ioctl(struct file *f, unsigned int cmd, unsigned long arg);
but inside sys/ioctl.h it is
int ioctl(int fd, int request, void *argp);
The first argument type is different, is there any module between ioctl calling program and driver that converts this argument(From file descriptor to file structure pointer)?
How this mapping works?(From file descriptor to file).