1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
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 #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
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 *******************************************************************************/
20 /********************************************************************20**
22 Name: System Services -- STREAMS
26 Desc: Data structure definitions for STREAMS messages.
30 *********************************************************************21*/
41 /* message block is defined in ssi.x */
42 typedef struct ssmsgb SsMblk;
49 U8 db_ref; /* reference count */
50 U8 db_type; /* type of data block */
52 Bool shared; /* is this data block shared ? */
53 #ifndef SS_DBUF_REFLOCK_DISABLE
54 SLockId dBufLock; /* Lock per Dbuf */
56 U8 *db_base; /* base of data buffer */
57 U8 *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 */
64 typedef struct ssdatab SsDblk;
68 /* to free memory used with esballoc() */
71 void (*free_func)(char *); /* free function */
72 char *free_arg; /* argument to function */
75 typedef struct ssfree_rtn SsFrtn;
79 /* STREAMS functions prototypes */
80 PUBLIC S16 ssStrmCfg ARGS((Region, Region));
81 PUBLIC S32 ssAdjMsg ARGS((SsMblk *, S32));
82 PUBLIC SsMblk *ssAllocB ARGS((S32, U32));
83 PUBLIC SsMblk *ssCopyB ARGS((SsMblk *));
84 PUBLIC SsMblk *ssCopyMsg ARGS((SsMblk *));
85 PUBLIC SsMblk *ssDupB ARGS((SsMblk *));
86 PUBLIC SsMblk *ssDupMsg ARGS((SsMblk *));
87 PUBLIC SsMblk *ssESBAlloc ARGS((U8 *, S32, S32, SsFrtn *));
88 PUBLIC void ssFreeB ARGS((SsMblk *));
89 PUBLIC void ssFreeMsg ARGS((SsMblk *));
90 PUBLIC void ssLinkB ARGS((SsMblk *, SsMblk *));
91 PUBLIC S32 ssMsgDSize ARGS((SsMblk *));
92 PUBLIC S32 ssPullupMsg ARGS((SsMblk *, S32));
93 PUBLIC SsMblk *ssRmvB ARGS((SsMblk *, SsMblk *));
94 PUBLIC S32 ssTestB ARGS((S32, U32));
95 PUBLIC SsMblk *ssUnlinkB ARGS((SsMblk *));
102 #endif /* __SSSTRMX__ */
104 /**********************************************************************
106 **********************************************************************/