netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [XFRM] Convert XFRM_MSG_* macros to an enum
@ 2004-07-03  9:52 Herbert Xu
  2004-07-03 10:00 ` YOSHIFUJI Hideaki / 吉藤英明
  2004-07-05 23:11 ` David S. Miller
  0 siblings, 2 replies; 8+ messages in thread
From: Herbert Xu @ 2004-07-03  9:52 UTC (permalink / raw)
  To: David S. Miller, netdev

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

Hi Dave:

I'd like to add two new xfrm_user messages, FLUSHSA and FLUSHPOLICY.

I've cleaned up the existing MSG definitions by converting them to
an enum.  This should make future additions slightly easier in that
XFRM_MSG_MAX won't have to be touched again.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[-- Attachment #2: p --]
[-- Type: text/plain, Size: 1229 bytes --]

===== include/linux/xfrm.h 1.20 vs edited =====
--- 1.20/include/linux/xfrm.h	2004-05-30 05:35:21 +10:00
+++ edited/include/linux/xfrm.h	2004-07-03 19:43:11 +10:00
@@ -103,26 +103,28 @@
 };
 
 /* Netlink configuration messages.  */
-#define XFRM_MSG_BASE		0x10
+enum {
+	XFRM_MSG_BASE = 0x10,
 
-#define XFRM_MSG_NEWSA		(XFRM_MSG_BASE + 0)
-#define XFRM_MSG_DELSA		(XFRM_MSG_BASE + 1)
-#define XFRM_MSG_GETSA		(XFRM_MSG_BASE + 2)
+	XFRM_MSG_NEWSA = 0x10,
+	XFRM_MSG_DELSA,
+	XFRM_MSG_GETSA,
 
-#define XFRM_MSG_NEWPOLICY	(XFRM_MSG_BASE + 3)
-#define XFRM_MSG_DELPOLICY	(XFRM_MSG_BASE + 4)
-#define XFRM_MSG_GETPOLICY	(XFRM_MSG_BASE + 5)
+	XFRM_MSG_NEWPOLICY,
+	XFRM_MSG_DELPOLICY,
+	XFRM_MSG_GETPOLICY,
 
-#define XFRM_MSG_ALLOCSPI	(XFRM_MSG_BASE + 6)
-#define XFRM_MSG_ACQUIRE	(XFRM_MSG_BASE + 7)
-#define XFRM_MSG_EXPIRE		(XFRM_MSG_BASE + 8)
+	XFRM_MSG_ALLOCSPI,
+	XFRM_MSG_ACQUIRE,
+	XFRM_MSG_EXPIRE,
 
-#define XFRM_MSG_UPDPOLICY	(XFRM_MSG_BASE + 9)
-#define XFRM_MSG_UPDSA		(XFRM_MSG_BASE + 10)
+	XFRM_MSG_UPDPOLICY,
+	XFRM_MSG_UPDSA,
 
-#define XFRM_MSG_POLEXPIRE	(XFRM_MSG_BASE + 11)
+	XFRM_MSG_POLEXPIRE,
 
-#define XFRM_MSG_MAX		(XFRM_MSG_POLEXPIRE+1)
+	XFRM_MSG_MAX
+};
 
 struct xfrm_user_tmpl {
 	struct xfrm_id		id;

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

end of thread, other threads:[~2004-07-05 23:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-03  9:52 [XFRM] Convert XFRM_MSG_* macros to an enum Herbert Xu
2004-07-03 10:00 ` YOSHIFUJI Hideaki / 吉藤英明
2004-07-03 10:02   ` Herbert Xu
2004-07-03 10:10     ` Herbert Xu
2004-07-03 10:04   ` YOSHIFUJI Hideaki / 吉藤英明
2004-07-05 23:11 ` David S. Miller
2004-07-05 23:21   ` Herbert Xu
2004-07-05 23:47     ` David S. Miller

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).