Wireshark

  • Riverbed Technology
  • WinPcap
the world's foremost network protocol analyzer
  • Wireshark
    • About
    • Download
    • Blog
  • Get Help
    • Ask a Question
    • FAQs
    • Documentation
    • Mailing Lists
    • Online Tools
    • Wiki
    • Bug Tracker
  • Develop
    • Get Involved
    • Developer's Guide
    • Browse the Code
    • Latest Builds

Wireshark-dev: Re: [Wireshark-dev] Add restrictions to arguments of dumpcap

Date Index Thread Index Other Months All Mailing Lists
Date Prev Date Next Thread Prev Thread Next


From: Nathan Jennings <njen@xxxxxxxxxxxx>
Date: Thu, 07 May 2009 16:04:15 -0400

On 5/7/2009 3:26 PM, Michael Tüxen wrote:

Maybe this is better?:

dumpcap -n -i dag0:2,"sctp && host 1.2.3.4" -i en0

In the parser, you should probably check for and allow use of single
quotes too (e.g. shell scripts), like:

dumpcap -n -i dag0:2,'sctp && host 1.2.3.4' -i en0

But we also have -y and -s... So taking this path requires something
like
-i interface_name,capture_filer,link_type,snap_length
How does this look like?


So any trailing capture filter on the command-line would apply to
interfaces that do *NOT* have a format like:

<interface_name>,<filter_string>

-Nathan


Sorry, I forgot about the other parameters...

If "link_type" is required, I think you have the order of those correct, i.e. the user isn't required to provide "snap_length", as it's the last parameter, which defaults to zero/65535.

So is "link_type" required?

If not, there'd be an issue with a parameter ordering requirement since both "link_type" and "snap_length" would be optional.

This starts down the parsing/coding/usability "slippery slope" of overloading "-i", but I can't think of another way other than requiring at least an empty parameter, e.g. ",,".

So, for example, if you have:

Interface  : dag0:2
Filter     : sctp && host 1.2.3.4
Link-type  : <default>
Snap-length: 256

you'd use:

dumpcap -n -i dag0:2,"sctp && host 1.2.3.4",,256 -i en0

-Nathan

  • Follow-Ups:
    • Re: [Wireshark-dev] Add restrictions to arguments of dumpcap
      • From: Michael Tüxen
    • Re: [Wireshark-dev] Add restrictions to arguments of dumpcap
      • From: Guy Harris
  • References:
    • [Wireshark-dev] Add restrictions to arguments of dumpcap
      • From: Michael Tüxen
    • Re: [Wireshark-dev] Add restrictions to arguments of dumpcap
      • From: Aaron Turner
    • Re: [Wireshark-dev] Add restrictions to arguments of dumpcap
      • From: Michael Tüxen
    • Re: [Wireshark-dev] Add restrictions to arguments of dumpcap
      • From: Aaron Turner
    • Re: [Wireshark-dev] Add restrictions to arguments of dumpcap
      • From: Stephen Donnelly
    • Re: [Wireshark-dev] Add restrictions to arguments of dumpcap
      • From: Sébastien Tandel
    • Re: [Wireshark-dev] Add restrictions to arguments of dumpcap
      • From: Nathan Jennings
    • Re: [Wireshark-dev] Add restrictions to arguments of dumpcap
      • From: Michael Tüxen
  • Prev by Date: Re: [Wireshark-dev] Add restrictions to arguments of dumpcap
  • Next by Date: Re: [Wireshark-dev] Add restrictions to arguments of dumpcap
  • Previous by thread: Re: [Wireshark-dev] Add restrictions to arguments of dumpcap
  • Next by thread: Re: [Wireshark-dev] Add restrictions to arguments of dumpcap
  • Index(es):
    • Date
    • Thread

Wireshark and the "fin" logo are registered trademarks of the Wireshark Foundation