Custom ioctl on Linux FORE200E ATM driver
I need to pass a user-space pointer for a 64 bit memory chunk to the FORE200E Linux ATM driver so that the driver can write in it. I was thinking of using the ioctl() call to perform this custom "operation" of the recording the user-space pointer in the driver module.
I open the socket without a problem:
atmSocket = socket(PF_ATMPVC, SOCK_DGRAM, 0);
I can do setsockopt(atmSocket, ...), send(atmSocket, ...) and recv(atmSocket, ...) calls also without a problem.
However, regardless of the cmd I pass to the ioctl() call, it always fails with the "No such device" error message:
ioctl(atmSocket, FIOGETOWN, &someInt);
-> ioctl: No such device
What am I doing wrong?