tcpdump mailing list archives

Re: New APIs to support multiple DLT_'s on an interface


From: Michael Richardson <mcr () sandelman ottawa on ca>
Date: Wed, 11 Dec 2002 23:53:09 -0500

-----BEGIN PGP SIGNED MESSAGE-----


"Guy" == Guy Harris <gharris () sonic net> writes:
    Guy> Tethereal and Ethereal should probably support the same options, if
    Guy> possible; one or both of them already uses

    Guy>        b h o P Q V

    Guy> leaving

    Guy>        g G H I M U W y

    Guy> which is a pretty poor selection, but such are the consequences of the
    Guy> folks at Bell Labs deciding that single-letter options were the way to
    Guy> go (perhaps defensible in the days of the PDP-11, but...).  I guess I'd

  Ironically, you start to appreciate the economy of command names when you
get something like Linux on a Zaurus... :-)

  A goal for tcpdump 4.0 is that we can have the "-lnetdissect" library, and
can then have the "tcpdump" wrapper for it (with classic command line
issues), and perhaps a newer, better named interface, that could have
multiple letter, well through out arguments...

    Guy> What should happen on platforms that don't support multiple link-layer
    Guy> types per interface?  The options I see are:

    Guy>        1) don't have the APIs present at all on those platforms;

    Guy>        2) have them return an error;

    Guy>        3) have "pcap_list_datalinks()" return a one-element list with
    Guy>           the "pcap_datalink()" value, and either have
    Guy>           "pcap_set_datalink()" return an error or return success if
    Guy>           you're setting the link-layer type to the type it already has
    Guy>           a failure otherwise.

  I like #3.

    Guy> (In any case, perhaps those APIs should take an additional "char
    Guy> *errbuf" argument so that if the error *isn't* one returned by a system
    Guy> call we can still supply an error message.)

  Yes.

    Guy> If we don't go with 1), I'm not sure whether 2) or 3) is better.  2)
    Guy> means that "-L" and "-D" or "-I" or whatever can report an error on
    Guy> platforms that don't let you choose a DLT_ value, whereas 3) means that
    Guy> you (the user) don't have to worry about what platform you're on, those
    Guy> options will do something at least semi-sensible even on platforms that
    Guy> don't let you choose a DLT_ value.

  #3 sounds to be kind of more regular to me.
  But I'm don't hold any strong opinions.

]       ON HUMILITY: to err is human. To moo, bovine.           |  firewalls  [
]   Michael Richardson, Sandelman Software Works, Ottawa, ON    |net architect[
] mcr () sandelman ottawa on ca http://www.sandelman.ottawa.on.ca/ |device driver[
] panic("Just another Debian GNU/Linux using, kernel hacking, security guy"); [


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Finger me for keys

iQCVAwUBPfgWM4qHRg3pndX9AQEj2AQA1NYKYtELRZaFwBVNEaLwwWsyPeNUhh4B
jrIpwx1jgWURz8kn+G3xLcjVVaM2i5fNkssZqE0AQyNyiSpOtCSyJyY+2TwITcSn
3vIudnD+05AIRj7copxACVNBr2/XqX12J6dpZ8qwgDmsyX5zWwuBjw4oHixMYmmC
gno+eJ/PQ7g=
=CZYX
-----END PGP SIGNATURE-----
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:tcpdump-workers-request () tcpdump org?body=unsubscribe


Current thread: