Re: _IOR/W with if_tun
From: Rob Warnock (rpw3_at_rpw3.org)
Date: 10/29/05
- Next message: Álvaro Jurado Cuevas: "Re: Another case of Java Plugin"
- Previous message: Jordan Abel: "Re: _IOR/W with if_tun"
- In reply to: bsder: "_IOR/W with if_tun"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 29 Oct 2005 06:17:15 -0500
bsder <snort_sam@yahoo.com> wrote:
+---------------
| Can anyone tell me what does the following codes do:
| /* ioctl's for get/set debug */
| #define TUNSDEBUG _IOW('t', 90, int)
| #define TUNGDEBUG _IOR('t', 89, int)
| #define TUNSIFINFO _IOW('t', 91, struct tuninfo)
| #define TUNGIFINFO _IOR('t', 92, struct tuninfo)
| #define TUNSLMODE _IOW('t', 93, int)
+---------------
Generally speaking, the _IOR macro is used to define codes
for ioctl()s which only return values back into user space
[a "IOctl Read", you might say], whereas the _IOW macro is
used for ioctl()s which set ["IOctl Write"] values into the
kernel. You can also see this in that the TUNGxxx codes are
for "Getting" ("Reading") values whereas the TUNSxxx codes
are for "Setting" ("Writing") values into the system.
See <sys/ttycom.h> for another example.
+---------------
| I tried to find out the implementation of the _IOR/W functions,
| but I found nothing in the src directory.
+---------------
Look in "/usr/src/sys/net/if_tun.c", routine "tunioctl()".
All your questions will be answered. ;-} ;-}
-Rob
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607
- Next message: Álvaro Jurado Cuevas: "Re: Another case of Java Plugin"
- Previous message: Jordan Abel: "Re: _IOR/W with if_tun"
- In reply to: bsder: "_IOR/W with if_tun"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|