allow for more than 255 connections on an interface; i.e.
authorKeith Sklower <sklower@ucbvax.Berkeley.EDU>
Wed, 31 Oct 1990 13:04:49 +0000 (05:04 -0800)
committerKeith Sklower <sklower@ucbvax.Berkeley.EDU>
Wed, 31 Oct 1990 13:04:49 +0000 (05:04 -0800)
make macros for encoding and decoding lcn <-> logical_chanel and lc_group_numbers

SCCS-vsn: sys/netccitt/pk.h 7.5

usr/src/sys/netccitt/pk.h

index a282781..dc6a7ef 100644 (file)
@@ -9,7 +9,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)pk.h        7.4 (Berkeley) %G%
+ *     @(#)pk.h        7.5 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -111,6 +111,10 @@ struct data_packet {
 #define PR(xp)         (((struct data_packet *)&xp -> packet_type)->pr)
 #define PS(xp)         (((struct data_packet *)&xp -> packet_type)->ps)
 #define MBIT(xp)       (((struct data_packet *)&xp -> packet_type)->m_bit)
 #define PR(xp)         (((struct data_packet *)&xp -> packet_type)->pr)
 #define PS(xp)         (((struct data_packet *)&xp -> packet_type)->ps)
 #define MBIT(xp)       (((struct data_packet *)&xp -> packet_type)->m_bit)
+#define LCN(xp)                (xp -> logical_channel_number + \
+       (xp -> lc_group_number ? (xp -> lc_group_number >> 8) : 0))
+#define SET_LCN(xp, lcn) ((xp -> logical_channel_number = lcn), \
+       (xp -> lc_group_number = lcn > 255 ? lcn >> 8 : 0))
 
 struct x25_packet *pk_template ();
 
 
 struct x25_packet *pk_template ();