magic.h: Put the CAPAB_... definitions together, under the big comment.
[secnet] / magic.h
diff --git a/magic.h b/magic.h
index 0f7e8d3..38982de 100644 (file)
--- a/magic.h
+++ b/magic.h
@@ -5,7 +5,7 @@
  *
  * secnet is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version d of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  * 
  * secnet is distributed in the hope that it will be useful, but
 #define LABEL_MSG9    0x09090909
 #define LABEL_PROD    0x0a0a0a0a
 
-/* uses of the 32-bit capability bitmap */
-#define CAPAB_EARLY           0x00000000 /* no Early flags yet (see NOTES) */
-#define CAPAB_TRANSFORM_MASK  0x0000ffff
-/* remaining 16 bits are unused */
-
 /*
- * The transform capability mask is a set of bits, one for each
- * transform supported.  The transform capability numbers are set in
- * the configuration (and should correspond between the two sites),
- * although there are sensible defaults.
+ * The capability mask is a set of bits, one for each optional feature
+ * supported.  The capability numbers for transforms are set in the
+ * configuration (and should correspond between the two sites), although
+ * there are sensible defaults.
  *
- * Advertising a nonzero transform capability mask promises that
- * the receiver understands LABEL_MSG3BIS messages, which
- * contain an additional byte specifying the transform capability
- * number actually chosen by the MSG3 sender.
+ * Advertising a nonzero capability mask promises that the receiver
+ * understands LABEL_MSG3BIS messages, which contain an additional byte
+ * specifying the transform capability number actually chosen by the MSG3
+ * sender.
  *
  * Aside from that, an empty bitmask is treated the same as
- *  1u<<CAPAB_TRANSFORMNUM_ANCIENT
+ *  1u<<CAPAB_BIT_ANCIENTTRANSFORM
  */
 
+/* uses of the 32-bit capability bitmap */
+#define CAPAB_EARLY           CAPAB_PRIORITY_MOBILE
+#define CAPAB_TRANSFORM_MASK  0x0000ffff
+#define CAPAB_PRIORITY_MOBILE 0x80000000 /* mobile site has MSG1 priority */
+/* remaining bits are unused */
+
 /* bit indices, 0 is ls bit */
-#define CAPAB_TRANSFORMNUM_USER_MIN              0
-#define CAPAB_TRANSFORMNUM_USER_MAX              7
-#define CAPAB_TRANSFORMNUM_SERPENT256CBC         8
-#define CAPAB_TRANSFORMNUM_EAXSERPENT            9
-#define CAPAB_TRANSFORMNUM_MAX                  15
+#define CAPAB_BIT_USER_MIN              0
+#define CAPAB_BIT_USER_MAX              7
+#define CAPAB_BIT_SERPENT256CBC         8
+#define CAPAB_BIT_EAXSERPENT            9
+#define CAPAB_BIT_MAX                  15
 
-#define CAPAB_TRANSFORMNUM_ANCIENT CAPAB_TRANSFORMNUM_SERPENT256CBC
+#define CAPAB_BIT_ANCIENTTRANSFORM CAPAB_BIT_SERPENT256CBC
 
 #endif /* magic_h */