The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



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

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-07-2002
j_t_kim j_t_kim is offline
Registered User
  
 

Join Date: Mar 2002
Posts: 6
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.
  #2 (permalink)  
Old 03-07-2002
killerserv's Avatar
killerserv killerserv is offline Forum Advisor  
Unix Predator
  
 

Join Date: Dec 2000
Location: Phoenix, AZ
Posts: 670
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.
  #3 (permalink)  
Old 03-08-2002
rwb1959's Avatar
rwb1959 rwb1959 is offline
Registered User
  
 

Join Date: Aug 2001
Location: Virginia, USA
Posts: 438
I'm not exactly sure what you're asking about
but you probably do NOT want to create your
own "ioctl()". Since "ioctl()" is a UNIX system
call, it may be easier to just define it out
something like...

#ifndef TESTRUN
ioctl(...);
#else
...do some dummy thing
#endif

Then when you "make" the program just use...

make .... -DTESTRUN

...to build the "test" program.
  #4 (permalink)  
Old 03-14-2002
developer developer is offline
Registered User
  
 

Join Date: Dec 2001
Location: UK
Posts: 23
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..
  #5 (permalink)  
Old 03-16-2002
AtleRamsli AtleRamsli is offline
Registered User
  
 

Join Date: Feb 2002
Location: Brabant, Belgium
Posts: 65
On Solaris, you may want to check out

man streamio

It lists ioctls for Solaris.
From your post it looks as if you are writing a distributed system, so you may want want to
check out

man rpc

Atle
Closed Thread

Bookmarks

« fscanf() | Rpc »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:05 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0