Adding new commiter to ODU-High repo
[o-du/l2.git] / src / mt / ss_strm.h
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2017-2019] [Radisys]                                        #
4 #                                                                              #
5 #   Licensed under the Apache License, Version 2.0 (the "License");            #
6 #   you may not use this file except in compliance with the License.           #
7 #   You may obtain a copy of the License at                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
11 #   Unless required by applicable law or agreed to in writing, software        #
12 #   distributed under the License is distributed on an "AS IS" BASIS,          #
13 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
14 #   See the License for the specific language governing permissions and        #
15 #   limitations under the License.                                             #
16 ################################################################################
17 *******************************************************************************/
18 \f
19 /********************************************************************20**
20  
21      Name:     System Services -- STREAMS
22  
23      Type:     C include file
24  
25      Desc:     Various macro definitions required for STREAMS.
26  
27      File:     ss_strm.h
28  
29 *********************************************************************21*/
30
31
32 #ifndef __SSSTRMH__
33 #define __SSSTRMH__
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39
40
41 /* STREAMS message types */
42 #define SS_M_DATA       0
43 #define SS_M_PROTO      1
44 #define SS_M_BREAK      2
45 #define SS_M_CTL        3
46 #define SS_M_DELAY      4
47 #define SS_M_IOCTL      5
48 #define SS_M_PASSFP     6
49 #define SS_M_RSE        7
50 #define SS_M_SETOPTS    8
51 #define SS_M_SIG        9
52
53
54 /* message initialization macro */
55 /* ss008.301 */
56 #ifdef SS_DBLK_FREE_RTN
57 #define SS_STRM_INITB(mp, dp, dat, size, frtn) \
58    (mp)->b_next = NULLP; \
59    (mp)->b_prev = NULLP; \
60    (mp)->b_cont = NULLP; \
61    (mp)->b_rptr = (dat); \
62    (mp)->b_wptr = (dat); \
63    (mp)->b_datap = (dp); \
64    (dp)->db_frtnp = (frtn); \
65    (dp)->db_base = (dat); \
66    (dp)->db_lim = (dat) == NULLP ? (dat) : ((dat) + (size)); \
67    (dp)->db_ref = 1; \
68    (dp)->db_type = SS_M_DATA; \
69         (dp)->shared = FALSE;
70   
71 #else
72 #define SS_STRM_INITB(mp, dp, dat, size, frtn) \
73    (mp)->b_next = NULLP; \
74    (mp)->b_prev = NULLP; \
75    (mp)->b_cont = NULLP; \
76    (mp)->b_rptr = (dat); \
77    (mp)->b_wptr = (dat); \
78    (mp)->b_datap = (dp); \
79    (dp)->db_base = (dat); \
80    (dp)->db_lim = (dat) == NULLP ? (dat) : ((dat) + (size)); \
81    (dp)->db_ref = 1; \
82    (dp)->db_type = SS_M_DATA; \
83         (dp)->shared = FALSE;
84 #endif /* SS_DBLK_FREE_RTN */
85
86
87 #ifdef __cplusplus
88 }
89 #endif
90
91 #endif  /*  __SSSTRMH__  */
92
93 /**********************************************************************
94          End of file
95  **********************************************************************/