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.
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
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.
Karthik Balaguru
>
>
>
> >> 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- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
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.