Thread (46 messages) 46 messages, 4 authors, 2010-02-02

RE: [PATCH net-next-2.6 09/13] net-caif: add CAIF netdevice

From: Marcel Holtmann <marcel@holtmann.org>
Date: 2010-02-02 14:15:30

Hi Sjur,
quoted
quoted
+int chnl_net_ioctl(unsigned int cmd, unsigned long arg, bool
+from_user_land) { +	struct chnl_net *priv;
+	int result = -1;
+	struct chnl_net *dev;
+	struct net_device *netdevptr;
+	int ret;
+	struct ifreq ifreq;
+	struct ifcaif_param param;
+	rtnl_lock();
+	if (from_user_land) {
+		if (copy_from_user(&ifreq, (const void *)arg, sizeof(ifreq)))
+			return -EFAULT; +	} else
+		memcpy(&ifreq, (void *)arg, sizeof(ifreq));
Why do you need both an ioctl and a netlink interface?
Well, I would like to keep support for both netlink and ioctl.
Internally we are using a netlink interface, and oFono is using ioctl to create interfaces.
we could try to convert oFono in using netlink. Shouldn't be that hard
as long as it is RTNL. Only the generic netlink is painful in userspace
applications with a mainloop.

Regards

Marcel

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help