Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - SIOCGDRVSPEC ioctl: Operation not permitted: (2 Items)
   
SIOCGDRVSPEC ioctl: Operation not permitted  
Hello,

I am using Neutrino 7.0 on an RCAR H3 starter kit. I wanted to check the functionality of the ravb driver provided with 
the BSP. The ioctl calls for driver specific commands return error code 103: Operation not permitted. I tried another 
method in this forum using IOV's and MsgSendv_r but they return the same error aswell. Here is the code snippet i use.

int sock = socket(AF_UNIX, SOCK_DGRAM, IPPROTO_IP);
if (sock == -1) {
	return -1;
};

struct ifdrv drv;
ptp_time_t ts;
drv.ifd_cmd = PTP_GET_TIME;
drv.ifd_len = sizeof(ts);
drv.ifd_data = &ts;
strcpy(drv.ifd_name,"ravb0");

int retVal = ioctl(sock, SIOCGDRVSPEC,&drv);
if(retVal)
{
	cout << "error: " << errno << endl;
	cout << strerror(errno) << endl;
}

I checked the driver code aswell and it supports the command.
Can you please help?
Re: SIOCGDRVSPEC ioctl: Operation not permitted  
Hello again,

I changed the socket type from AF_UNIX to AF_INET and the ioctl is reaching the driver.