[ Jira id - ODUHIGH-593 ] Pack and unpack function nomenclature correction
[o-du/l2.git] / src / mt / ss_strm.x
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
19 \f
20 /********************************************************************20**
21  
22      Name:     System Services -- STREAMS
23  
24      Type:     C include file
25  
26      Desc:     Data structure definitions for STREAMS messages.
27  
28      File:     ss_strm.x
29  
30 *********************************************************************21*/
31
32
33 #ifndef __SSSTRMX__
34 #define __SSSTRMX__
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40
41 /* message block is defined in ssi.x */
42 typedef struct ssmsgb    SsMblk;
43
44
45
46 /* data block */
47 struct ssdatab
48 {
49    uint8_t                   db_ref;                 /* reference count */
50    uint8_t                   db_type;                /* type of data block */
51         /* ss006.301 */
52    Bool                 shared;                 /* is this data block shared ? */
53 #ifndef  SS_DBUF_REFLOCK_DISABLE
54    SLockId              dBufLock;              /* Lock per Dbuf */
55 #endif
56    uint8_t                   *db_base;               /* base of data buffer */
57    uint8_t                   *db_lim;                /* limit of data buffer */
58         /* ss008.301 - deprecating for normal OS, useful for Cavium/RMI OS*/
59 #ifdef SS_DBLK_FREE_RTN
60    struct ssfree_rtn    *db_frtnp;             /* free routine */
61 #endif /* SS_DBLK_FREE_RTN */
62 };
63
64 typedef struct ssdatab   SsDblk;
65
66
67
68 /* to free memory used with esballoc() */
69 struct ssfree_rtn
70 {
71    void                 (*free_func)(char *);   /* free function */
72    char                 *free_arg;              /* argument to function */
73 };
74
75 typedef struct ssfree_rtn SsFrtn;
76
77
78
79 /* STREAMS functions prototypes */
80 S16      ssStrmCfg ARGS((Region, Region));
81 S32      ssAdjMsg ARGS((SsMblk *, S32));
82 SsMblk   *ssAllocB ARGS((S32, uint32_t));
83 SsMblk   *ssCopyB ARGS((SsMblk *));
84 SsMblk   *ssCopyMsg ARGS((SsMblk *));
85 SsMblk   *ssDupB ARGS((SsMblk *));
86 SsMblk   *ssDupMsg ARGS((SsMblk *));
87 SsMblk   *ssESBAlloc ARGS((uint8_t *, S32, S32, SsFrtn *));
88 void     ssFreeB ARGS((SsMblk *));
89 void     ssFreeMsg ARGS((SsMblk *));
90 void     ssLinkB ARGS((SsMblk *, SsMblk *));
91 S32      ssMsgDSize ARGS((SsMblk *));
92 S32      ssPullupMsg ARGS((SsMblk *, S32));
93 SsMblk   *ssRmvB ARGS((SsMblk *, SsMblk *));
94 S32      ssTestB ARGS((S32, uint32_t));
95 SsMblk   *ssUnlinkB ARGS((SsMblk *));
96
97
98 #ifdef __cplusplus
99 }
100 #endif
101
102 #endif  /*  __SSSTRMX__  */
103
104 /**********************************************************************
105          End of file
106 **********************************************************************/