PERFORCE change 113729 for review

Robert Watson rwatson at FreeBSD.org
Tue Jan 30 21:37:14 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=113729

Change 113729 by rwatson at rwatson_cinnamon on 2007/01/30 21:36:36

	Add TAPGETUNIT ioctl to if_tap, which allows the user daemon to
	query the ifnet unit number without playing fstat() and minor
	device number games.

Affected files ...

.. //depot/projects/zcopybpf/src/sys/net/if_tap.c#2 edit
.. //depot/projects/zcopybpf/src/sys/net/if_tap.h#2 edit

Differences ...

==== //depot/projects/zcopybpf/src/sys/net/if_tap.c#2 (text+ko) ====

@@ -639,6 +639,10 @@
 			tapp->baudrate = ifp->if_baudrate;
 			break;
 
+		case TAPGETUNIT:
+			*(u_int *)data = dev2unit(dev);
+			break;
+
 		case TAPSDEBUG:
 			tapdebug = *(int *)data;
 			break;

==== //depot/projects/zcopybpf/src/sys/net/if_tap.h#2 (text+ko) ====

@@ -55,6 +55,7 @@
 #define	TAPGDEBUG		_IOR('t', 89, int)
 #define	TAPSIFINFO		_IOW('t', 91, struct tapinfo)
 #define	TAPGIFINFO		_IOR('t', 92, struct tapinfo)
+#define	TAPGETUNIT		_IOR('t', 93, u_int)
 
 /* VMware ioctl's */
 #define VMIO_SIOCSIFFLAGS	_IOWINT('V', 0)


More information about the p4-projects mailing list