This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: ioctl() SOS -- Please help
- To: Corinna Vinschen <corinna@vinschen.de>, cygwin@sourceware.cygnus.com
- Subject: Re: ioctl() SOS -- Please help
- From: "Ashish C. Nagre" <ashishcn@cisco.com>
- Date: Tue, 01 Jun 1999 14:04:33 -0700
- Organization: Cisco Systems
- References: <374C9D2B.CBDD1EC4@cisco.com> <374CA453.6E07EFD1@vinschen.de> <374D85CF.AC0FFED3@cisco.com> <374D9F8D.3F370DF3@vinschen.de>
- Reply-To: ashishcn@cisco.com
Hello,
I was trying to debug (using gdb) the application that I am trying to
port from UNIX to NT.
I have made a strange observation, when the following call is made:
ioctl(fd, SIOCGIFFLAGS, (char *)&ifr)
The value returned in the member ifr.ifr_ifru.ifru_flags is different
when I just run the executable compared to when I run it in the
debugger.
ifr.ifr_ifru.ifru_flags = 34 (executable)
ifr.ifr_ifru.ifru_flags = 99 (in gdb)
As a result, the following condition
(ifr.ifr_ifru.ifru_flags & 0x1) ---> indicates that interface is up
always returns TRUE (correctly) in the gdb but returns FALSE
(erroneously) as the executable.
Why are the flags returned with different values ?
Is there a bug in the command ?
Thanks for your help.
Regards,
Ashish
Corinna Vinschen wrote:
>
> "Ashish C. Nagre" wrote:
> > [...]
> > My question is should I overwrite the cygwin1.dll with the new dll that
> > I got like you asked me to or should I copy it somewhere and just add
> > the new dll in the PATH (using set PATH etc.)
>
> Overwrite it. To have more than one of this DLLs in the PATH is a
> no no!
>
> > Because, even though now I have the dll and the source, I don't know how
> > to get my code which makes the ioctl() calls to work with these new
> > files.
>
> After you have copied the new DLL over the old one, you only have to
> copy
> winsup/include/asm/socket.h to the according directory in your include
> path.
>
> This would have been easier, if you had taken my DLL, which I mentioned
> in the first mail, too. It contains exactly the needed files.
>
> Regards,
> Corinna
>
> --
> new mail address:
> mailto:corinna@vinschen.de
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com