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 *******************************************************************************/
19 /********************************************************************20**
21 Name: System Services -- Message manipulation functions
25 Desc: Data structure definitions for message related functions.
29 *********************************************************************21*/
39 /* pool type -- dynamic or static */
40 typedef U8 SsPoolType;
45 typedef struct ssDPoolEntry
47 SsdDPoolEntry dep; /* implementation specific */
48 Size size; /* to use for SAlloc() */
53 typedef struct ssSPoolEntry
55 SsdSPoolEntry dep; /* implementation specific */
59 /* generic pool (includes dynamic and static) */
60 typedef struct ssPoolEntry
62 SsdPoolEntry dep; /* implementation specific */
63 SsPoolType type; /* dynamic or static */
66 SsSPoolEntry spool; /* static pool */
67 SsDPoolEntry dpool; /* dynamic pool */
72 /* event information--what kind of message is this */
73 typedef struct ssEventInfo
75 U8 event; /* event type */
80 SsIdx tmrIdx; /* timer index */
81 Bool inUse; /* message in use? */
82 Bool dynBuf; /* dynamic buffer? */
83 } tmr; /* for timer events */
88 /* Information stored in the control portion of a message.
89 * The SGETBUFREGION, SGETBUFPOOL, SGetBufRegionPool macros
90 * depend on the order of the first two elements of this
91 * structure. Make sure the macros are consistent with the
94 typedef struct ssMsgInfo
96 Region region; /* region id of the msg chain */
97 Pool pool; /* pool id of the msg chain */
98 MsgLen len; /* num of bytes in the msg */
99 Buffer *endptr; /* ptr to last mblk in chain */
100 Buffer *next; /* for SInitNxtDBuf() */
101 Pst pst; /* post for this message */
102 SsEventInfo eventInfo; /* event information */
109 #endif /* __SSMSGX__ */
113 /********************************************************************30**
116 **********************************************************************/