1 /* 2 * s_common.h - common definitions for Solaris PPP 3 * 4 * Copyright (c) 2000-2001 by Sun Microsystems, Inc. 5 * All rights reserved. 6 */ 7 8 #ifndef _S_COMMON_H 9 #define _S_COMMON_H 10 11 #pragma ident "%Z%%M% %I% %E% SMI" 12 13 #include <net/ppp_defs.h> 14 #include <net/pppio.h> 15 16 #ifdef __cplusplus 17 extern "C" { 18 #endif 19 20 #ifndef MTYPE 21 #define MTYPE(mp) (mp->b_datap->db_type) 22 #endif 23 24 #ifndef Dim 25 #define Dim(x) (sizeof (x) / sizeof (*(x))) 26 #endif 27 28 /* Extract byte i of message mp */ 29 #define MSG_BYTE(mp, i) \ 30 ((i) < MBLKL(mp) ? (mp)->b_rptr[i] : msg_byte((mp), (i))) 31 32 extern int putctl4(queue_t *, uchar_t, uchar_t, uint16_t); 33 extern int putctl8(queue_t *, uchar_t, uchar_t, uint32_t); 34 extern int msg_byte(mblk_t *, unsigned int); 35 extern mblk_t *create_lsmsg(enum LSstat); 36 37 #ifdef __cplusplus 38 } 39 #endif 40 41 #endif /* _S_COMMON_H */ 42