Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
iproute2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
iproute2
Commits
f1e4f042
Commit
f1e4f042
authored
Aug 04, 2006
by
jamal
Committed by
Stephen Hemminger
Aug 04, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add help text for actions.
parent
dc02ede6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
8 deletions
+30
-8
tc/m_action.c
tc/m_action.c
+22
-2
tc/m_gact.c
tc/m_gact.c
+8
-6
No files found.
tc/m_action.c
View file @
f1e4f042
...
...
@@ -37,7 +37,27 @@ int tab_flush = 0;
void
act_usage
(
void
)
{
fprintf
(
stderr
,
"action usage improper
\n
"
);
/*XXX: In the near future add a action->print_help to improve
* usability
* This would mean new tc will not be backward compatible
* with any action .so from the old days. But if someone really
* does that, they would know how to fix this ..
*
*/
fprintf
(
stderr
,
"usage: tc actions <ACTSPECOP>*
\n
"
);
fprintf
(
stderr
,
"Where:
\t
ACTSPECOP := ACR | GD | FL
\n
"
"
\t
ACR := add | change | replace <ACTSPEC>*
\n
"
"
\t
GD := get | delete | <ACTISPEC>*
\n
"
"
\t
FL := ls | list | flush | <ACTNAMESPEC>
\n
"
"
\t
ACTNAMESPEC := action <ACTNAME>
\n
"
"
\t
ACTISPEC := <ACTNAMESPEC> <INDEXSPEC>
\n
"
"
\t
ACTSPEC := action <ACTDETAIL> [INDEXSPEC]
\n
"
"
\t
INDEXSPEC := index <32 bit indexvalue>
\n
"
"
\t
ACTDETAIL := <ACTNAME> <ACTPARAMS>
\n
"
"
\t\t
Example ACTNAME is gact, mirred etc
\n
"
"
\t\t
Each action has its own parameters (ACTPARAMS)
\n
"
"
\n
"
);
}
static
int
print_noaopt
(
struct
action_util
*
au
,
FILE
*
f
,
struct
rtattr
*
opt
)
...
...
@@ -598,7 +618,7 @@ int do_action(int argc, char **argv)
}
if
(
ret
<
0
)
{
fprintf
(
stderr
,
"Command
\"
%s
\"
is unknown, try
\"
tc action help
\"
.
\n
"
,
*
argv
);
fprintf
(
stderr
,
"Command
\"
%s
\"
is unknown, try
\"
tc action
s
help
\"
.
\n
"
,
*
argv
);
return
-
1
;
}
}
...
...
tc/m_gact.c
View file @
f1e4f042
...
...
@@ -171,6 +171,8 @@ parse_gact(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, struc
argc
--
;
argv
++
;
ok
++
;
}
else
if
(
matches
(
*
argv
,
"help"
)
==
0
)
{
usage
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment