netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Fwd: [IPROUTE2]: Explicit BNF definition for actions]
@ 2006-08-05 16:42 jamal
  2006-08-07 17:49 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: jamal @ 2006-08-05 16:42 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev

[-- Attachment #1: Type: text/plain, Size: 767 bytes --]


Stephen,

This is the one after the last one you responded to. Your git tree is
not uptodate so i cant tell if you are missing it or not ;->

I dont think i will be making more updates for this release - more to
come later.

cheers,
jamal

-------- Forwarded Message --------
From: jamal <hadi@cyberus.ca>
Reply-To: hadi@cyberus.ca
To: Stephen Hemminger <shemminger@osdl.org>
Subject: [IPROUTE2]: Explicit BNF definition for actions
Date: Sun, 30 Jul 2006 20:04:41 -0400

Stephen,
Patch attached. I wanted to send more but my body decided to get sick. 
So go ahead and make a release with just this - In the future i should
be able to send more. If you sync all the patches with your tree, when i
git i should be able to tell if you are missing any..

cheers,
jamal

[-- Attachment #2: act_u11 --]
[-- Type: text/plain, Size: 2275 bytes --]

Add explicit help text for actions

---
commit 87d5ee5fddd9476bd720ea339f6ddb237d6eb99c
tree 1888b85dbb7a724df0a215c7f1a07b857a3cd00b
parent e2e0fac73a39bc6878f93cd7698f4c823ef85546
author Jamal Hadi Salim <hadi@cyberus.ca> Sun, 30 Jul 2006 20:00:37 -0400
committer Jamal Hadi Salim <hadi@jzny2.(none)> Sun, 30 Jul 2006 20:00:37 -0400

 tc/m_action.c |   25 +++++++++++++++++++++++--
 tc/m_gact.c   |    4 +++-
 2 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/tc/m_action.c b/tc/m_action.c
index c612069..3808a86 100644
--- a/tc/m_action.c
+++ b/tc/m_action.c
@@ -37,7 +37,28 @@ 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: \tACTSPECOP := ACR | GD | FL\n"
+			"\tACR := add | change | replace <ACTSPEC>* \n"
+			"\tGD := get | delete | <ACTISPEC>*\n"
+			"\tFL := ls | list | flush | <ACTNAMESPEC>\n"
+			"\tACTNAMESPEC :=  action <ACTNAME>\n"
+			"\tACTISPEC := <ACTNAMESPEC> <INDEXSPEC>\n"
+			"\tACTSPEC := action <ACTDETAIL> [INDEXSPEC]\n"
+			"\tINDEXSPEC := index <32 bit indexvalue>\n"
+			"\tACTDETAIL := <ACTNAME> <ACTPARAMS>\n"
+			"\t\tExample ACTNAME is gact, mirred etc\n"
+			"\t\tEach action has its own parameters (ACTPARAMS)\n"
+			"\n");
+
 	exit(-1);
 }
 
@@ -599,7 +620,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 actions help\".\n", *argv);
 			return -1;
 		}
 	}
diff --git a/tc/m_gact.c b/tc/m_gact.c
index 4e3f3c7..cfbaf87 100644
--- a/tc/m_gact.c
+++ b/tc/m_gact.c
@@ -56,7 +56,7 @@ #else
 	fprintf(stderr,
 		"Where: \tACTION := reclassify | drop | continue | pass \n"
 		"\tINDEX := index value used\n"
-			"\n");
+		"\n");
 #endif
 }
 
@@ -179,6 +179,8 @@ #endif
 			argc--;
 			argv++;
 			ok++;
+		} else if (matches(*argv, "help") == 0) {
+				usage();
 		}
 	}
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Fwd: [IPROUTE2]: Explicit BNF definition for actions]
  2006-08-05 16:42 [Fwd: [IPROUTE2]: Explicit BNF definition for actions] jamal
@ 2006-08-07 17:49 ` Stephen Hemminger
  2006-08-07 18:26   ` jamal
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2006-08-07 17:49 UTC (permalink / raw)
  To: hadi; +Cc: netdev

On Sat, 05 Aug 2006 12:42:35 -0400
jamal <hadi@cyberus.ca> wrote:

> 
> Stephen,
> 
> This is the one after the last one you responded to. Your git tree is
> not uptodate so i cant tell if you are missing it or not ;->
> 
> I dont think i will be making more updates for this release - more to
> come later.
> 
> cheers,
> jamal
> 

I needed to merge the branch in, the git tree is now up to date.

-- 
Stephen Hemminger <shemminger@osdl.org>
"And in the Packet there writ down that doome"

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Fwd: [IPROUTE2]: Explicit BNF definition for actions]
  2006-08-07 17:49 ` Stephen Hemminger
@ 2006-08-07 18:26   ` jamal
  0 siblings, 0 replies; 3+ messages in thread
From: jamal @ 2006-08-07 18:26 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev

On Mon, 2006-07-08 at 10:49 -0700, Stephen Hemminger wrote:

> I needed to merge the branch in, the git tree is now up to date.

I have never gathered the energy to figure that stuff out so i dont envy
you.

In any case, seems to be missing the majority of the patches i sent,
including this one whose subject you are responding to;-> 
I dont have time to chase it right now, but i could resend later on. Or
you could grab them off the list archive.

cheers,
jamal



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-08-07 18:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-05 16:42 [Fwd: [IPROUTE2]: Explicit BNF definition for actions] jamal
2006-08-07 17:49 ` Stephen Hemminger
2006-08-07 18:26   ` jamal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).