/* * Mausezahn - A fast versatile traffic generator * Copyright (C) 2008 Herbert Haas * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License version 2 as published by the * Free Software Foundation. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program; if not, see http://www.gnu.org/licenses/gpl-2.0.html * */ #include "mz.h" #include "cli.h" #include "mops.h" int transmit (struct cli_def *cli, const char *command, char *argv[], int argc) { int i; char argstr[10000]; argstr[0]='\0'; if (argc>1) { for (i=1; i10000) { cli_print(cli, "Argument list too long!\n"); return CLI_OK; } if (strncmp(argv[i], "?", 1)==0) { strcat(argstr, ",help"); } else strncat(argstr, argv[i], 5000); // TODO: This is ugly! } // TEST: cli_print(cli, "argc=%i, got '%s'\n", argc, argstr); } if (argv[0] == NULL) // raw hex string given { mode = BYTE_STREAM; } else if (strcmp(argv[0],"arp")==0) { mode = ARP; } else if (strcmp(argv[0],"bpdu")==0) { mode = BPDU; } else if (strcmp(argv[0],"ip")==0) { mode = IP; } else if (strcmp(argv[0],"udp")==0) { mode = UDP; } else if (strcmp(argv[0],"icmp")==0) { mode = ICMP; } else if (strcmp(argv[0],"tcp")==0) { mode = TCP; } else if (strcmp(argv[0],"dns")==0) { mode = DNS; } else if (strcmp(argv[0],"cdp")==0) { mode = CDP; } else if (strcmp(argv[0],"syslog")==0) { mode = SYSLOG; } else if (strcmp(argv[0],"lldp")==0) { mode = LLDP; tx.packet_mode=0; // create whole frame by ourself } else if (strcmp(argv[0],"rtp")==0) { mode = RTP; } else if (strcmp(argv[0],"raw")==0) { strncpy(tx.arg_string, argstr, MAX_PAYLOAD_SIZE); send_eth(); } else if (strcmp(argv[0],"?")==0) { cli_print(cli, "| The following packet types are currently implemented:\n" "|\n" "| arp ... sends ARP packets\n" "| bpdu ... sends BPDU packets (STP)\n" "| cdp ... sends CDP messages\n" "| ip ... sends IPv4 packets\n" "| udp ... sends UDP datagrams\n" "| tcp ... sends TCP segments\n" "| icmp ... sends ICMP messages\n" "| dns ... sends DNS messages\n" "| rtp ... sends RTP datagrams\n" "| syslog ... sends Syslog messages\n" "| lldp ... sends LLDP datagrams\n" "|\n" "| raw ... raw layer 2 mode (specify whole frame in hex)\n" "\n" ); return CLI_OK; } else { cli_print(cli, "Unknown packet type '%s'\r", argv[0]); } if (mode) { strncpy(tx.arg_string, argstr, MAX_PAYLOAD_SIZE); tx_switch(cli); } return CLI_OK; } tation/mmc/mmc-tools.txt
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-10-24 21:30:19 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-24 21:30:19 -0700
commitb5cd891716a9ef118ce8d3a367b6b0fa912447fc (patch)
tree026a2f00b2876c43cc8287b7ffadf1e4061dc200 /Documentation/mmc/mmc-tools.txt
parent1ce5bdb8312b6e9629029340063ea1e5cfac435d (diff)
parent91bbc174d45c347aa7aedb2215cc7d2013c06c1f (diff)
Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux
Pull clk fixes from Stephen Boyd: "This is the first batch of clk driver fixes for this release. We have a handful of fixes for the uniphier clk driver that was introduced recently, as well as Kconfig option hiding, module autoloading markings, and a few fixes for clk_hw based registration patches that went in this merge window" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: at91: Fix a return value in case of error clk: uniphier: rename MIO clock to SD clock for Pro5, PXs2, LD20 SoCs clk: uniphier: fix memory overrun bug clk: hi6220: use CLK_OF_DECLARE_DRIVER for sysctrl and mediactrl clock init clk: mvebu: armada-37xx-periph: Fix the clock gate flag clk: bcm2835: Clamp the PLL's requested rate to the hardware limits. clk: max77686: fix number of clocks setup for clk_hw based registration clk: mvebu: armada-37xx-periph: Fix the clock provider registration clk: core: add __init decoration for CLK_OF_DECLARE_DRIVER function clk: mediatek: Add hardware dependency clk: samsung: clk-exynos-audss: Fix module autoload clk: uniphier: fix type of variable passed to regmap_read() clk: uniphier: add system clock support for sLD3 SoC
Diffstat (limited to 'Documentation/mmc/mmc-tools.txt')