def METHOD_NAME():
    if sys.version_info > (3,):
        default_outfile = sys.stdout.buffer
    else:
        default_outfile = sys.stdout
    p = argparse.ArgumentParser()
    p.add_argument(
        "-b",
        "--baudrate",
        type=int,
        default=DEFAULT_BAUDRATE,
        help="Baudrate of the serial port (only evaluated "
        "for non TCP-terminal, default: %d)" % DEFAULT_BAUDRATE,
    )
    p.add_argument(
        "conn",
        metavar="tty/host:port",
        type=str,
        help="Serial port or TCP (host, port) tuple to "
        "terminal with sniffer application",
    )
    p.add_argument("channel", type=int, help="Channel to sniff on")
    p.add_argument(
        "outfile",
        type=argparse.FileType("w+b"),
        default=default_outfile,
        nargs="?",
        help="PCAP file to output to (default: stdout)",
    )
    args = p.parse_args()
    conn = connect(args)
    sleep(1)
    configure_interface(conn, args.channel)
    sleep(1)
    try:
        generate_pcap(conn, args.outfile)
    except KeyboardInterrupt:
        conn.close()
        print()
        sys.exit(2)