This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Question about socket calls


"Ashish C. Nagre" wrote:
> 
> Hello,
> I am a new user of cygnus and am trying to port a UNIX application to NT
> 4.0
> My problem is as follows:
> [...]
>          if (ioctl(fd, SIOCGIFADDR, (char *)&ifr) < 0) {
> [...]
> It returns errno = 22 which means Invalid argument.
> SIOCGIFADDR has been defined by me as follows:
> 
> #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     _IOWR('i', 13, struct ifreq)    /* get ifnet
> address */

If you create a new define for the request parameter of the ioctl call,
how should the underlying system know, what you want?

Or, in other words, the absence of this define in the asm/socket.h
file has the meaning, that this request is not available. Full stop.
Your define will not change this.

You are using the official b20.1 version, isn't it? In the meantime,
this request (and the requests SIOCGIFBRDADDR and SIOCGIFNETMASK)
are implemented in cygwin. Try the official 15-Jan-1999 snapshot in

ftp://sourceware.cygnus.com/pub/cygwin/snapshot-19990115/

named
	cygwin1-19990115.dll.gz  	(the dll itself)
	winsup-src-19990115.tar.gz	(contains sources and especially
					 the header files)

or try my patched version of the 23-Dec-1998 snapshot in
ftp://ftp.franken.de/pub/win32/develop/gnuwin32/cygwin/porters/Vinschen_Corinna/B20

named
	cv_cygwin1.dll.README
	cv_cygwin1.dll.tar.gz		(dll and headers)

Regards,
Corinna

-- 
new mail address:
mailto:corinna@vinschen.de



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]