1 // vim: noet sw=4 ts=4:
3 ==================================================================================
4 Copyright (c) 2020 Nokia
5 Copyright (c) 2018-2020 AT&T Intellectual Property.
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
11 http://www.apache.org/licenses/LICENSE-2.0
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 ==================================================================================
22 *****************************************************************************
25 * Abstract: Private constants for SI functions.
28 * Author: E. Scott Daniels
31 *****************************************************************************
41 #ifndef PARANOID_CHECKS
42 # define PARANOID_CHECKS 0
45 //#define EOS '\000' // end of string marker
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
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
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
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
68 #define MAGICNUM 219 // magic number for validation of things
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
75 #define NO_EVENT 0 // look returns 0 if no event on a fd