[netfilter-cvslog] r3420 - trunk/nfsim/core

rusty at netfilter.org rusty at netfilter.org
Fri Dec 17 02:17:12 CET 2004


Author: rusty at netfilter.org
Date: 2004-12-17 02:17:11 +0100 (Fri, 17 Dec 2004)
New Revision: 3420

Modified:
   trunk/nfsim/core/utils.h
Log:
Add __unique_id() which is useful for dropping things in sections (eg. cmdline options work)


Modified: trunk/nfsim/core/utils.h
===================================================================
--- trunk/nfsim/core/utils.h	2004-12-16 14:22:23 UTC (rev 3419)
+++ trunk/nfsim/core/utils.h	2004-12-17 01:17:11 UTC (rev 3420)
@@ -46,5 +46,12 @@
 void *grab_file(int fd, unsigned long *size);
 void release_file(void *data, unsigned long size);
 
+/* Paste two tokens together. */
+#define ___cat(a,b) a ## b
+#define __cat(a,b) ___cat(a,b)
+
+/* Try to give a unique identifier: this comes close, iff used as static. */
+#define __unique_id(stem) __cat(__cat(__uniq,stem),__LINE__)
+
 extern void kernelenv_init(void);
 #endif /* _STDRUSTY_H */




More information about the netfilter-cvslog mailing list