Skip to content

Feature request: allow integers in -y #758

@gpotter2

Description

@gpotter2

Hello,

It would be great if the -y option (data link type) could also accept the integer values of the DLT types.

It would require a small change in

tcpdump/tcpdump.c

Lines 1823 to 1829 in c36abfe

case 'y':
yflag_dlt_name = optarg;
yflag_dlt =
pcap_datalink_name_to_val(yflag_dlt_name);
if (yflag_dlt < 0)
error("invalid data link type %s", yflag_dlt_name);
break;

We play around with the numeric values of the datalinks in Scapy, (therefore we don't support -y ATM) as we use them to write pcaps, therefore it would make it easier for us to call tcpdump.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions