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 #include <net/ppp_defs.h> 12 #include <net/pppio.h> 13 14 #ifdef __cplusplus 15 extern "C" { 16 #endif 17 18 #ifndef MTYPE 19 #define MTYPE(mp) (mp->b_datap->db_type) 20 #endif 21 22 #ifndef Dim 23 #define Dim(x) (sizeof (x) / sizeof (*(x))) 24 #endif 25 26 /* Extract byte i of message mp */ 27 #define MSG_BYTE(mp, i) \ 28 ((i) < MBLKL(mp) ? (mp)->b_rptr[i] : msg_byte((mp), (i))) 29 30 extern int putctl4(queue_t *, uchar_t, uchar_t, uint16_t); 31 extern int putctl8(queue_t *, uchar_t, uchar_t, uint32_t); 32 extern int msg_byte(mblk_t *, unsigned int); 33 extern mblk_t *create_lsmsg(enum LSstat); 34 35 #ifdef __cplusplus 36 } 37 #endif 38 39 #endif /* _S_COMMON_H */ 40