#compdef trafgen # # trafgen.zsh -- zsh completion function for trafgen # # Copyright (C) 2013 Hideo Hattori # # 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. typeset -A opt_args local context state line _cpu () { _cpus=(${${(f)"$(grep processor /proc/cpuinfo | awk '{print $3}')"}}) compadd -a _cpus } _user_info () { user_info=(${${(f)"$(awk -F':' '{print $3":"$1}' /etc/passwd)"}}) _describe -t usr "user info" user_info && ret=0 } _group_info () { group_info=(${${(f)"$(awk -F':' '{print $4":"$1}' /etc/passwd)"}}) _describe -t usr "group info" group_info && ret=0 } _interfaces () { _wanted interfaces expl 'network interface' \ _net_interfaces _values "Pseudo-device that captures on all interfaces" "any" } _arguments -s -S \ "(-i -c --in --conf)"{-i,-c,--in,--conf}"[Packet configuration file/stdin]:input:_files" \ "(-o -d --out --dev)"{-o,-d,--out,--dev}"[Networking device i.e., eth0]:device:_interfaces" \ "(-p --cpp)"{-p,--cpp}"[Run packet config through C preprocessor]" \ "(-J --jumbo-support)"{-J,--jumbo-support}"[Support 64KB super jumbo frames (def: 2048B)]" \ "(-R --rfraw)"{-R,--rfraw}"[Inject raw 802.11 frames]" \ "(-s --smoke-test)"{-s,--smoke-test}"[Probe if machine survived fuzz-tested packet]" \ "(-n --num)"{-n,--num}"[Number of packets until exit (def: 0)]" \ "(-r --rand)"{-r,--rand}"[Randomize packet selection (def: round robin)]" \ "(-P --cpus)"{-P,--cpus}"[Specify number of forks(<= CPUs) (def: #CPUs)]:cpunum:_cpu" \ "(-t --gap)"{-t,--gap}"[Interpacket gap in us (approx)]" \ "(-S --ring-size)"{-S,--ring-size}"[Manually set mmap size (KiB/MiB/GiB)]:ringsize:" \ "(-k --kernel-pull)"{-k,--kernel-pull}"[Kernel pull from user interval in us (def: 10us)]:kernelpull:_gnu_generic" \ "(-E --seed)"{-E,--seed}"[Manually set srand(3) seed]" \ "(-u --user)"{-u,--user}"[Drop privileges and change to userid]:user:_user_info" \ "(-g --group)"{-g,--group}"[Drop privileges and change to groupid]:group:_group_info" \ "(-e --example)"{-e,--example}"[Show built-in packet config example]:" \ "(-V --verbose)"{-V,--verbose}"[Be more verbose]" \ {-v,--version}"[Show version]:" \ {-h,--help}"[Guess what?!]:" \ "*::args:_gnu_generic" 6ce0d86ca6d035295e874fa99'/>
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-08-09 10:34:09 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-08-09 10:34:09 -0700
commit84bd8d33a9604256ce0d86ca6d035295e874fa99 (patch)
tree9056887c06370fcd85087ace93b1754d87454010
parentb79f34d6aef3ae57342db8102a3524f54b382fd7 (diff)
parentc87edb36118664f1fa275107c1138b6f47793240 (diff)
Merge tag 'trace-v4.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing fix from Steven Rostedt: "Fix tick_stop tracepoint symbols for user export. Luiz Capitulino noticed that the tick_stop tracepoint wasn't being parsed properly by the tracing user space tools. This was due to the TRACE_DEFINE_ENUM() being set to a define, when it should have been set to the enum itself. The define was of the MASK that used the BIT to shift. The BIT was the enum and by adding that, everything gets converted nicely. The MASK is still kept just in case it gets converted to an enum in the future" * tag 'trace-v4.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Fix tick_stop tracepoint symbols for user export