LEGO wrote:
>"-i -" in the getopts of ethereal got broken. Few days ago it used to
>work. There's something with the "-" because if I use a named pipe
>(fifo) it works fine.
>
>I took a look at gtk/main.c but could not found the reason.
>
>[trunk/plugins/cellog] lego% cat t.cap | /usr/local/bin/ethereal -kl
>-o 'user10.encap: cellog' -i -
>ethereal: option requires an argument -- i
>ethereal: option requires an argument -- i
>
>ethereal [ -vh ] [ -klLnpQS ] [ -a <capture autostop condition> ] ...
> [ -b <capture ring buffer option> ] ...] [ -B capture buffer
>size (Win32 only) ]
> [ -c <capture packet count> ] [ -f <capture filter> ]
> [ -g <packet number> ]
> [ -i <capture interface> ] [ -m <font> ] [ -N <name resolving flags> ]
> [ -o <preference/recent setting> ] ...
> [ -r <infile> ] [ -R <read (display) filter> ] [ -s <capture snaplen> ]
> [ -t <time stamp format> ]
> [ -w <savefile> ] [ -y <capture link type> ] [ -z <statistics> ]
> [ <infile> ]
>[trunk/plugins/cellog] lego% cat t.cap | /usr/local/bin/ethereal -kl
>-i - -o 'user10.encap: cellog'
>ethereal: You can't specify both a live capture and a capture file to be read.
>
>vs.
>
>[trunk/plugins/cellog] lego% mkfifo tfifo ; /usr/local/bin/ethereal
>-kl -i tfifo -o 'user10.encap: cellog' &
>[1] 11548
>[trunk/plugins/cellog] lego% cat t.cap >> tfifo
>
>
>
could you file this in bugzilla?
I recently did some changes to fix #135, but I don't think this is related.
There seems to be different getopt implementations around (depending on
the operating system?), and some of them handles the - char as the start
of a new parameter causing this problem.
Regards, ULFL