Add safe connect, fix possible seg fault in RTC
[ric-plt/lib/rmr.git] / src / rmr / si / src / si95 / siconst.h
1 // vim: noet sw=4 ts=4:
2 /*
3 ==================================================================================
4         Copyright (c) 2020 Nokia
5         Copyright (c) 2018-2020 AT&T Intellectual Property.
6
7    Licensed under the Apache License, Version 2.0 (the "License");
8    you may not use this file except in compliance with the License.
9    You may obtain a copy of the License at
10
11                  http://www.apache.org/licenses/LICENSE-2.0
12
13    Unless required by applicable law or agreed to in writing, software
14    distributed under the License is distributed on an "AS IS" BASIS,
15    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16    See the License for the specific language governing permissions and
17    limitations under the License.
18 ==================================================================================
19 */
20
21 /*
22 *****************************************************************************
23 *
24 *  Mnemonic: siconst.h
25 *  Abstract: Private constants for SI functions.
26 *
27 *  Date:         26 March 1995
28 *  Author:   E. Scott Daniels
29 *
30 *
31 *****************************************************************************
32 */
33
34 #ifndef _siconst_h
35 #define _siconst_h
36
37 #ifndef DEBUG
38 #define DEBUG 0
39 #endif 
40
41 #ifndef PARANOID_CHECKS
42 #       define PARANOID_CHECKS 0
43 #endif
44
45 //#define EOS   '\000'           //  end of string marker 
46
47                                                                 //  general info block flags 
48 #define GIF_SHUTDOWN    0x01   //  shutdown in progress 
49 #define GIF_NODELAY             0x02   //  set no delay flag on t_opens 
50
51                                                                 //  transmission provider block flags 
52 #define TPF_LISTENFD    0x01   //  set on tp blk that is fd for tcp listens 
53 #define TPF_SESSION             0x02   //  session established on this fd 
54 #define TPF_UNBIND              0x04   //  SIterm should unbind the fd 
55 #define TPF_DRAIN               0x08   //  session is being drained 
56 #define TPF_DELETE              0x10    //  block is ready for deletion -- when safe 
57 #define TPF_SAFEC               0x20    // use safe connect when connecting
58 #define TPF_ABORT               0x40    // connection should be aborted at termination
59
60 #define MAX_CBS                 8        //  number of supported callbacks in table 
61 #define MAX_RBUF                8192   //  max size of receive buffer 
62 #define MAX_FDS                 2048    // max number of file descriptors
63
64 #define TP_BLK  0                        //  block types for rsnew 
65 #define GI_BLK  1                        //  global information block 
66 #define IOQ_BLK 2                        //  input output block 
67
68 #define MAGICNUM        219             //  magic number for validation of things 
69
70 #define AC_TODOT  0                      //  convert address to dotted decimal string 
71 #define AC_TOADDR 1                      //  address conversion from dotted dec 
72 #define AC_TOADDR6 2            //  ipv6 address conversion from string to addr struct 
73 #define AC_TOADDR6_4BIND 3      //  ipv6 address conversion from string to addr struct suitible for bind 
74
75 #define NO_EVENT 0                      //  look returns 0 if no event on a fd 
76
77 #endif