www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/05/26/20:34:01

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Sender: root AT pluto DOT ipass DOT net
Message-ID: <374C928B.AB301B0D@ipass.net>
Date: Wed, 26 May 1999 20:32:11 -0400
From: "Suhaib M. Siddiqi" <ssiddiqi AT ipass DOT net>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.2.5-15 i586)
X-Accept-Language: en
MIME-Version: 1.0
To: "Ashish C. Nagre" <nagreac AT cs DOT purdue DOT edu>, cygwin AT sourceware DOT cygnus DOT com
Subject: Re: ioctl() question
References: <Pine DOT GSO DOT 4 DOT 05 DOT 9905261914470 DOT 13492-100000 AT lisa DOT cs DOT purdue DOT edu>

Ashish,

I saw your following message this morning on the list.  I did not answer
it
because I did not fully understood what you were trying to say.

Thanks for contacting me personally.  I am forwarding you message to the
list and I hope someone who knows more about socket implimentations
would help you.

Could someone please answer his question if Cygwin could handle his
ioctl, fd socket or what was he doing wrong? 

Regards
Suhaib

"Ashish C. Nagre" wrote:
> 
> Hi,
> I was trying to port an app from UNIX to NT, one of the things that needs
> to be done is to get the interface addresses associated with the machine.
> It does that using the following call:
> 
>         ioctl(fd, SIOCGIFADDR, (char*)&ifr)
>         where,
>         fd - is a socket
>         ifr - is a struct ifreq.
> The function returns an error saying Invalid Argument.
> Actually, SIOCGIFADDR was not defined with cygwin, so I added the
> following also:
> 
>         /* Just a definition of a macro which was not with cygnus; */
> /* so the compiler doesn't complain.                                    */
> #define IOC_INOUT       (IOC_IN |IOC_OUT)
> #define _IOWR(x, y, t) \
>         (IOC_INOUT|((((int)sizeof (t))&IOCPARM_MASK)<<16)|(x<<8)|y)
> #define SIOCGIFADDR     _IOR('i', 13, struct ifreq)    /* get ifnet
> address */
> 
> I would greatly appreciate it if you could help me out since I am stuck on
> this for a long time and have no clue about how to go about this.
> Thanks for your time.
> 
> Ashish
> 
> **************************************************************************
> ASHISH C. NAGRE                             Graduate Student
> Department of Computer Sciences             e-mail: nagreac AT cs DOT purdue DOT edu
> Purdue University,W. Lafayette              Phone : (765)-494-5007
> Indiana, 47906. USA                         Office: MA 407
> url : www.cs.purdue.edu/people/nagreac
> **************************************************************************
>                        :PHILOSOPHY OF LIFE:
> Stability without boredom; passion without recklessness; happiness
> without naivete. Plan for sunshine but bring an umbrella.  A little
> paranoia never hurt anyone. Underpromise and overdeliver.
> ---------------------------------------------------------------------------

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019