47 fi |
46 fi |
48 service="$words[1]" |
47 service="$words[1]" |
49 curcontext="${curcontext%:*}=$service:" |
48 curcontext="${curcontext%:*}=$service:" |
50 fi |
49 fi |
51 case $service in |
50 case $service in |
|
51 |
52 ("show-flow") |
52 ("show-flow") |
53 _arguments -A "-*" \ |
53 _arguments -A "-*" \ |
54 '-o[specify field to display]:field:(flow link ipaddr proto port dsfield)' \ |
54 '-o[specify field to display]:field:(flow link ipaddr proto port dsfield)' \ |
55 '-p[parsable output]' \ |
55 '-p[parsable output]' \ |
56 '-P[persistent flow property information]' \ |
56 '-P[persistent flow property information]' \ |
57 '-S[continuously display network utilization by flow]' \ |
|
58 '-s[display flow statistics]' \ |
|
59 '-i[specify interval (used with -s)]:interval' \ |
|
60 - set1 \ |
57 - set1 \ |
61 '-l[display information for link]:link or flow:_net_interfaces' \ |
58 '-l[display information for link]:link or flow:_net_interfaces' \ |
62 - set2 \ |
59 - set2 \ |
63 ':flow:_flowadm_flow' \ |
60 ':flow:_flowadm_flow' \ |
64 ;; |
61 ;; |
|
62 |
65 ("add-flow") |
63 ("add-flow") |
66 _arguments -A "-*" \ |
64 _arguments -A "-*" \ |
67 '-t[temporary changes - do not persist across reboots]' \ |
65 '-t[temporary changes - do not persist across reboots]' \ |
68 '-R[alternate root dir]:alternate root:_files' \ |
66 '-R[alternate root dir]:alternate root:_files' \ |
69 '-l[specify link to which flow will be added]:link:_net_interfaces' \ |
67 '-l[specify link to which flow will be added]:link:_net_interfaces' \ |
70 '-a[specify attribute]:attribute:(local_ip= remote_ip= transport=$tr local_port= dsfield=)' \ |
68 '-a[specify attribute]:attribute:(local_ip= remote_ip= transport=$tr local_port= dsfield=)' \ |
71 '-p[set property value]:property:(maxbw= priority=)' \ |
69 '-p[set property value]:property:(maxbw=)' \ |
72 ;; |
70 ;; |
|
71 |
73 ("remove-flow") |
72 ("remove-flow") |
74 _arguments -A "-*" \ |
73 _arguments -A "-*" \ |
75 '-t[temporary changes - do not persist across reboots]' \ |
74 '-t[temporary changes - do not persist across reboots]' \ |
76 '-R[alternate root dir]:alternate root:_files' \ |
75 '-R[alternate root dir]:alternate root:_files' \ |
77 - set1 \ |
76 - set1 \ |
78 '-l[specify link from which flow will be deleted]:link:_net_interfaces' \ |
77 '-l[specify link from which flow will be deleted]:link:_net_interfaces' \ |
79 - set2 \ |
78 - set2 \ |
80 ':flow:_flowadm_flow' \ |
79 ':flow:_flowadm_flow' \ |
81 ;; |
80 ;; |
|
81 |
82 ("set-flowprop") |
82 ("set-flowprop") |
83 _arguments -A "-*" \ |
83 _arguments -A "-*" \ |
84 '-t[temporary changes - do not persist across reboots]' \ |
84 '-t[temporary changes - do not persist across reboots]' \ |
85 '-R[alternate root dir]:alternate root:_files' \ |
85 '-R[alternate root dir]:alternate root:_files' \ |
86 '-p[set property value]:property:(maxbw= priority=)' \ |
86 '-p[set property value]:property:(maxbw=)' \ |
87 ':flow:_flowadm_flow' \ |
87 ':flow:_flowadm_flow' \ |
88 ;; |
88 ;; |
|
89 |
89 ("reset-flowprop") |
90 ("reset-flowprop") |
90 _arguments -A "-*" \ |
91 _arguments -A "-*" \ |
91 '-t[temporary changes - do not persist across reboots]' \ |
92 '-t[temporary changes - do not persist across reboots]' \ |
92 '-R[alternate root dir]:alternate root:_files' \ |
93 '-R[alternate root dir]:alternate root:_files' \ |
93 '-p[set property value]:property:(maxbw= priority=)' \ |
94 '-p[set property value]:property:(maxbw=)' \ |
94 ':flow:_flowadm_flow' \ |
95 ':flow:_flowadm_flow' \ |
95 ;; |
96 ;; |
|
97 |
96 ("show-flowprop") |
98 ("show-flowprop") |
97 _arguments -A "-*" \ |
99 _arguments -A "-*" \ |
98 '-c[parsable output (requires -o)]' \ |
100 '-c[parsable output (requires -o)]' \ |
|
101 '-l[specify link whose properties will be shown]:link:_net_interfaces' \ |
99 '-P[persistent flow property information]' \ |
102 '-P[persistent flow property information]' \ |
100 '-p[property to show]:property:_values -s , "property" $props' \ |
103 '-p[property to show]:property:_values -s , "property" $props' \ |
101 ':flow:_flowadm_flow' \ |
104 ':flow:_flowadm_flow' \ |
102 ;; |
105 ;; |
103 ("show-usage") |
|
104 _arguments -A "-*" \ |
|
105 '-a[display all historical network usage]' \ |
|
106 '-s[start time for data display (YYYY.MM.DD,hh:mm:ss)]' \ |
|
107 '-e[end time for data display (YYYY.MM.DD,hh:mm:ss)]' \ |
|
108 '-f[Read extended accounting records of network flow usage from file]:file:_files' \ |
|
109 ':flow:_flowadm_flow' \ |
|
110 - set1 \ |
|
111 '-F[specifies the format of plotfile (gnuplot is only supported format)]' \ |
|
112 '-p[outputs flow usage data to a file of the format specified by the -F option]:plotfile:_files' \ |
|
113 - set2 \ |
|
114 '-d[display date in the format DD/MM/YYYY]' \ |
|
115 ;; |
|
116 |
106 |
117 esac |
107 esac |
118 } |
108 } |
119 |
109 |
120 _flowadm "$@" |
110 _flowadm "$@" |