f



Windows based ethreal and Cygwin based network application

Hi,

I am using cygwin for development
and debugging of a network based
application that parses and prints
the packets before further processing.

Is it not possible to use Windows
based Ethereal for my application
that is being executed from cygwin ?

I tried it, but it did not work. :-(
Not sure if there is a problem with
my application. Lemme know if that
combination of cygwin based
application and windows based
ethereal would not work.
In the meantime, i would be
debugging the application.

Thx in advans,
Karthik Balaguru
0
12/25/2009 2:44:35 PM
comp.os.linux.networking 15677 articles. 0 followers. Post Follow

5 Replies
841 Views

Similar Articles

[PageSpeed] 42

karthikbalaguru wrote:
> Hi,
> 
> I am using cygwin for development
> and debugging of a network based
> application that parses and prints
> the packets before further processing.
> 
> Is it not possible to use Windows
> based Ethereal for my application
> that is being executed from cygwin ?
> 
> I tried it, but it did not work. :-(
> Not sure if there is a problem with
> my application. Lemme know if that
> combination of cygwin based
> application and windows based
> ethereal would not work.
> In the meantime, i would be
> debugging the application.
> 
> Thx in advans,
> Karthik Balaguru

Cygwin is a often a pain to work with - if you can, use mingw and msys. 
  Cygwin has more posix functionality than mingw/msys, and can thus 
compile more *nix programs with fewer changes, but the emulation layers 
make it slower and less "native" - it doesn't feel like windows, and it 
doesn't feel like Linux, and cygwin1.dll brings new levels to "dll 
hell".  I feel that mingw/msys give you a simpler and cleaner system 
with programs that fit in better with windows.

Anyway, wireshark (as Ethereal is called these days) runs native in 
windows, and should have no trouble capturing packets from any software 
running on the machine - cygwin-based or otherwise.
0
David
12/26/2009 10:15:05 AM
On Dec 26, 3:15=A0pm, David Brown
<david.br...@hesbynett.removethisbit.no> wrote:
> karthikbalaguru wrote:
> > Hi,
>
> > I am using cygwin for development
> > and debugging of a network based
> > application that parses and prints
> > the packets before further processing.
>
> > Is it not possible to use Windows
> > based Ethereal for my application
> > that is being executed from cygwin ?
>
> > I tried it, but it did not work. :-(
> > Not sure if there is a problem with
> > my application. Lemme know if that
> > combination of cygwin based
> > application and windows based
> > ethereal would not work.
> > In the meantime, i would be
> > debugging the application.
>
> > Thx in advans,
> > Karthik Balaguru
>
> Cygwin is a often a pain to work with - if you can, use mingw and msys.
> =A0 Cygwin has more posix functionality than mingw/msys, and can thus
> compile more *nix programs with fewer changes, but the emulation layers
> make it slower and less "native" - it doesn't feel like windows, and it
> doesn't feel like Linux, and cygwin1.dll brings new levels to "dll
> hell". =A0I feel that mingw/msys give you a simpler and cleaner system
> with programs that fit in better with windows.
>

I remember that MinGW forked from one of the earlier
versions of Cygwin and later followed different approach.
I will try the mingw/msys also, but i came across the below
link that claims some issues w.r.t POSIX support in MinGW -
http://en.wikipedia.org/wiki/MinGW#Comparison_with_Cygwin

The above link also claims that MinGW is unable to
compile some Unix applications that can be compiled with
Cygwin. Specifically, this applies to applications that require
POSIX functionality like fork(), mmap() or ioctl() and those
that expect to be run in a POSIX environment.
How to overcome this problem in MinGW ?
Any thoughts ?

> Anyway, wireshark (as Ethereal is called these days) runs native in
> windows, and should have no trouble capturing packets from any software
> running on the machine - cygwin-based or otherwise.- Hide quoted text -
>

Cool :-) Your reply w.r.t wireshark on windows and
ethereal in cygwin is really very helpful !

Thx,
Karthik Balaguru
0
karthikbalaguru
12/26/2009 11:01:22 AM
karthikbalaguru wrote:
> On Dec 26, 3:15 pm, David Brown
> <david.br...@hesbynett.removethisbit.no> wrote:
>> karthikbalaguru wrote:
>>> Hi,
>>> I am using cygwin for development
>>> and debugging of a network based
>>> application that parses and prints
>>> the packets before further processing.
>>> Is it not possible to use Windows
>>> based Ethereal for my application
>>> that is being executed from cygwin ?
>>> I tried it, but it did not work. :-(
>>> Not sure if there is a problem with
>>> my application. Lemme know if that
>>> combination of cygwin based
>>> application and windows based
>>> ethereal would not work.
>>> In the meantime, i would be
>>> debugging the application.
>>> Thx in advans,
>>> Karthik Balaguru
>> Cygwin is a often a pain to work with - if you can, use mingw and msys.
>>   Cygwin has more posix functionality than mingw/msys, and can thus
>> compile more *nix programs with fewer changes, but the emulation layers
>> make it slower and less "native" - it doesn't feel like windows, and it
>> doesn't feel like Linux, and cygwin1.dll brings new levels to "dll
>> hell".  I feel that mingw/msys give you a simpler and cleaner system
>> with programs that fit in better with windows.
>>
> 
> I remember that MinGW forked from one of the earlier
> versions of Cygwin and later followed different approach.
> I will try the mingw/msys also, but i came across the below
> link that claims some issues w.r.t POSIX support in MinGW -
> http://en.wikipedia.org/wiki/MinGW#Comparison_with_Cygwin
> 
> The above link also claims that MinGW is unable to
> compile some Unix applications that can be compiled with
> Cygwin. Specifically, this applies to applications that require
> POSIX functionality like fork(), mmap() or ioctl() and those
> that expect to be run in a POSIX environment.
> How to overcome this problem in MinGW ?
> Any thoughts ?

Yes - avoid these functions, then there are no problems.  These 
functions are not needed for most software.  mmap is often useful, but 
never essential - a lot of open source software makes the use of mmap 
configurable before compilation.  fork() is not supported in mingw, 
because it is not supported by windows - there is no equivalent of cheap 
forks as in *nix.  However, vfork() /is/ supported, and the very common 
usage of fork()+exec() can be replaced by vfork()+exec() (this is also 
normally faster, even on *nix systems).  ioctl() typically does not make 
sense in something like mingw (or cygwin), since it is for low-level 
hardware access - if you want hardware access on a windows system, you 
have to write it the windows way.

It is certainly true that you can compile more *nix software under 
cygwin than with mingw - but /if/ it can compile under mingw, you get a 
smaller and faster binary that plays better with the host.  A lot of 
software (such as gcc) used to only compile under cygwin, but in more 
recent versions you can compile under mingw.

> 
>> Anyway, wireshark (as Ethereal is called these days) runs native in
>> windows, and should have no trouble capturing packets from any software
>> running on the machine - cygwin-based or otherwise.- Hide quoted text -
>>
> 
> Cool :-) Your reply w.r.t wireshark on windows and
> ethereal in cygwin is really very helpful !
> 
> Thx,
> Karthik Balaguru
0
David
12/26/2009 2:02:26 PM
On Dec 26, 7:02=A0pm, David Brown
<david.br...@hesbynett.removethisbit.no> wrote:
> karthikbalaguru wrote:
> > On Dec 26, 3:15 pm, David Brown
> > <david.br...@hesbynett.removethisbit.no> wrote:
> >> karthikbalaguru wrote:
> >>> Hi,
> >>> I am using cygwin for development
> >>> and debugging of a network based
> >>> application that parses and prints
> >>> the packets before further processing.
> >>> Is it not possible to use Windows
> >>> based Ethereal for my application
> >>> that is being executed from cygwin ?
> >>> I tried it, but it did not work. :-(
> >>> Not sure if there is a problem with
> >>> my application. Lemme know if that
> >>> combination of cygwin based
> >>> application and windows based
> >>> ethereal would not work.
> >>> In the meantime, i would be
> >>> debugging the application.
> >>> Thx in advans,
> >>> Karthik Balaguru
> >> Cygwin is a often a pain to work with - if you can, use mingw and msys=
..
> >> =A0 Cygwin has more posix functionality than mingw/msys, and can thus
> >> compile more *nix programs with fewer changes, but the emulation layer=
s
> >> make it slower and less "native" - it doesn't feel like windows, and i=
t
> >> doesn't feel like Linux, and cygwin1.dll brings new levels to "dll
> >> hell". =A0I feel that mingw/msys give you a simpler and cleaner system
> >> with programs that fit in better with windows.
>
> > I remember that MinGW forked from one of the earlier
> > versions of Cygwin and later followed different approach.
> > I will try the mingw/msys also, but i came across the below
> > link that claims some issues w.r.t POSIX support in MinGW -
> >http://en.wikipedia.org/wiki/MinGW#Comparison_with_Cygwin
>
> > The above link also claims that MinGW is unable to
> > compile some Unix applications that can be compiled with
> > Cygwin. Specifically, this applies to applications that require
> > POSIX functionality like fork(), mmap() or ioctl() and those
> > that expect to be run in a POSIX environment.
> > How to overcome this problem in MinGW ?
> > Any thoughts ?
>
> Yes - avoid these functions, then there are no problems. =A0These
> functions are not needed for most software. =A0mmap is often useful, but
> never essential - a lot of open source software makes the use of mmap
> configurable before compilation. =A0fork() is not supported in mingw,
> because it is not supported by windows - there is no equivalent of cheap
> forks as in *nix. =A0However, vfork() /is/ supported, and the very common
> usage of fork()+exec() can be replaced by vfork()+exec() (this is also
> normally faster, even on *nix systems). =A0ioctl() typically does not mak=
e
> sense in something like mingw (or cygwin), since it is for low-level
> hardware access - if you want hardware access on a windows system, you
> have to write it the windows way.
>
> It is certainly true that you can compile more *nix software under
> cygwin than with mingw - but /if/ it can compile under mingw, you get a
> smaller and faster binary that plays better with the host. =A0A lot of
> software (such as gcc) used to only compile under cygwin, but in more
> recent versions you can compile under mingw.
>
>

Okay.
So, it can be put in simple terms as below :-
- If there is POSIX dependency, Cygwin is the better choice.
- For other scenarios, MinGW is the better choice.

Karthik Balaguru

>
>
>
> >> Anyway, wireshark (as Ethereal is called these days) runs native in
> >> windows, and should have no trouble capturing packets from any softwar=
e
> >> running on the machine - cygwin-based or otherwise.- Hide quoted text =
-
>
> > Cool :-) Your reply w.r.t wireshark on windows and
> > ethereal in cygwin is really very helpful !
>
> > Thx,
> > Karthik Balaguru- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

0
karthikbalaguru
12/26/2009 5:58:43 PM
karthikbalaguru wrote:
> On Dec 26, 7:02 pm, David Brown
> <david.br...@hesbynett.removethisbit.no> wrote:
>> karthikbalaguru wrote:
>>> On Dec 26, 3:15 pm, David Brown
>>> <david.br...@hesbynett.removethisbit.no> wrote:
>>>> karthikbalaguru wrote:
>>>>> Hi,
>>>>> I am using cygwin for development
>>>>> and debugging of a network based
>>>>> application that parses and prints
>>>>> the packets before further processing.
>>>>> Is it not possible to use Windows
>>>>> based Ethereal for my application
>>>>> that is being executed from cygwin ?
>>>>> I tried it, but it did not work. :-(
>>>>> Not sure if there is a problem with
>>>>> my application. Lemme know if that
>>>>> combination of cygwin based
>>>>> application and windows based
>>>>> ethereal would not work.
>>>>> In the meantime, i would be
>>>>> debugging the application.
>>>>> Thx in advans,
>>>>> Karthik Balaguru
>>>> Cygwin is a often a pain to work with - if you can, use mingw and msys.
>>>>   Cygwin has more posix functionality than mingw/msys, and can thus
>>>> compile more *nix programs with fewer changes, but the emulation layers
>>>> make it slower and less "native" - it doesn't feel like windows, and it
>>>> doesn't feel like Linux, and cygwin1.dll brings new levels to "dll
>>>> hell".  I feel that mingw/msys give you a simpler and cleaner system
>>>> with programs that fit in better with windows.
>>> I remember that MinGW forked from one of the earlier
>>> versions of Cygwin and later followed different approach.
>>> I will try the mingw/msys also, but i came across the below
>>> link that claims some issues w.r.t POSIX support in MinGW -
>>> http://en.wikipedia.org/wiki/MinGW#Comparison_with_Cygwin
>>> The above link also claims that MinGW is unable to
>>> compile some Unix applications that can be compiled with
>>> Cygwin. Specifically, this applies to applications that require
>>> POSIX functionality like fork(), mmap() or ioctl() and those
>>> that expect to be run in a POSIX environment.
>>> How to overcome this problem in MinGW ?
>>> Any thoughts ?
>> Yes - avoid these functions, then there are no problems.  These
>> functions are not needed for most software.  mmap is often useful, but
>> never essential - a lot of open source software makes the use of mmap
>> configurable before compilation.  fork() is not supported in mingw,
>> because it is not supported by windows - there is no equivalent of cheap
>> forks as in *nix.  However, vfork() /is/ supported, and the very common
>> usage of fork()+exec() can be replaced by vfork()+exec() (this is also
>> normally faster, even on *nix systems).  ioctl() typically does not make
>> sense in something like mingw (or cygwin), since it is for low-level
>> hardware access - if you want hardware access on a windows system, you
>> have to write it the windows way.
>>
>> It is certainly true that you can compile more *nix software under
>> cygwin than with mingw - but /if/ it can compile under mingw, you get a
>> smaller and faster binary that plays better with the host.  A lot of
>> software (such as gcc) used to only compile under cygwin, but in more
>> recent versions you can compile under mingw.
>>
>>
> 
> Okay.
> So, it can be put in simple terms as below :-
> - If there is POSIX dependency, Cygwin is the better choice.
> - For other scenarios, MinGW is the better choice.
> 

Yes, although that's perhaps over simplifying it a bit - mingw also 
provides a fair amount of posix functionality.  But cygwin gets closer. 
  And these days virtualisation of various sorts is so easy, and so 
flexible, that there is much less call for cygwin than there used to be. 
  So I would go for mingw if I wanted software that works natively on 
windows, Linux in a Virtual Box machine for Linux software, and only 
cygwin if these were not possible choices.
0
David
12/27/2009 9:05:52 PM
Reply: