Please explain to me the working of the
You have to open the device you want to manipulate before calling
ioctl. Then you pass the file descriptor for the device you want to manipulate as the first parameter. You would only call
ioctl when there's some particular device that has some particular manipulation that you want to perform on it.