![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Inappropriate ioctl for device | RishiPahuja | Shell Programming and Scripting | 11 | 03-19-2008 10:47 PM |
| Inappropriate ioctl for device at | contactme | UNIX for Dummies Questions & Answers | 0 | 03-26-2007 11:22 AM |
| Inappropriate ioctl for device | steelrose | UNIX for Dummies Questions & Answers | 4 | 08-23-2006 11:08 AM |
| Inappropriate ioctl for device | tojaiganesh | Filesystems, Disks and Memory | 4 | 03-17-2005 05:23 PM |
| Warning message ioctl | Diana | UNIX Desktop for Dummies Questions & Answers | 1 | 05-01-2002 09:59 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
ioctl()
UNIX, gnu cc compiler, SUN Ultra 60
Hello, this is my first post, so please bear with me. I'm currently developing a test environment for a network subsystem that, when live, accesses databases and other network elements. However, my test environment will be run offline, so I need to fake the compiler out on several instances. I was wondering if anyone knew the details of the ioctl() command. I have already written a dummy function in its place, but right now the compiler gets confused because there are two definitions of ioctl(), but I need to have it see the one I wrote... Anyone have an idea? Thanks a lot. |
|
|||||
|
This page might be usefull for you check it out.
http://www.mkssoftware.com/docs/man3/ioctl.3.asp its a brief explanation of ioctl() and some examples also from the explanation i figured it out something similar with what you are looking for. Might help. |
|
||||
|
Briefly the ioctl function is called with three arguments. The first is a file descriptor, a socket in the case of network programming. The second argument is the request, e.g. what you want to do, there are many of them like SIOCGIFADDR which returns to you the protocol address assigned to your interface. The third argument is a pointer and it depends of the request, for instance if you want to get interface configuration parameters the pointer is of struct ifconf type. You can check the manual page of ioctl_list so as to get a list of the available requests.
The problem is that ioctl is not the same for all unix like os, it may vary. Last week I was trying to configure a proxy arp server with ioctl but the damn thing was not working properly. I posted a mail to the linux kernel mailing list but anfortunately nobody answered. Last edited by developer; 03-18-2002 at 08:05 AM.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|