+/*
+ * Definitions for accessing bitfields/bitslices inside X.25 structs
+ */
+
+
+struct x25bitslice {
+ unsigned int bs_mask;
+ unsigned int bs_shift;
+};
+
+#define calling_addrlen 0
+#define called_addrlen 1
+#define q_bit 2
+#define d_bit 3
+#define fmt_identifier 4
+#define lc_group_number 1
+#define p_r 5
+#define m_bit 6
+#define p_s 7
+#define zilch 8
+
+#define X25GBITS(Arg, Index) (((Arg) & x25_bitslice[(Index)].bs_mask) >> x25_bitslice[(Index)].bs_shift)
+#define X25SBITS(Arg, Index, Val) (Arg) |= (((Val) << x25_bitslice[(Index)].bs_shift) & x25_bitslice[(Index)].bs_mask)
+#define X25CSBITS(Arg, Index, Val) (Arg) = (((Val) << x25_bitslice[(Index)].bs_shift) & x25_bitslice[(Index)].bs_mask)
+
+extern struct x25bitslice x25_bitslice[];
+
+
+#define ISOFIFTTYPE(i,t) ((i)->if_type == (t))
+#define ISISO8802(i) ((ISOFIFTTYPE(i, IFT_ETHER) || \
+ ISOFIFTTYPE(i, IFT_ISO88023) || \
+ ISOFIFTTYPE(i, IFT_ISO88024) || \
+ ISOFIFTTYPE(i, IFT_ISO88025) || \
+ ISOFIFTTYPE(i, IFT_ISO88026) || \
+ ISOFIFTTYPE(i, IFT_P10) || \
+ ISOFIFTTYPE(i, IFT_P80) || \
+ ISOFIFTTYPE(i, IFT_FDDI)))
+