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 *****************************************************************************
42 //#define EOS '\000' // end of string marker
44 // general info block flags
45 #define GIF_SHUTDOWN 0x01 // shutdown in progress
46 #define GIF_NODELAY 0x02 // set no delay flag on t_opens
48 // transmission provider block flags
49 #define TPF_LISTENFD 0x01 // set on tp blk that is fd for tcp listens
50 #define TPF_SESSION 0x02 // session established on this fd
51 #define TPF_UNBIND 0x04 // SIterm should unbind the fd
52 #define TPF_DRAIN 0x08 // session is being drained
53 #define TPF_DELETE 0x10 // block is ready for deletion -- when safe
55 #define MAX_CBS 8 // number of supported callbacks in table
56 #define MAX_RBUF 8192 // max size of receive buffer
57 #define MAX_FDS 2048 // max number of file descriptors
59 #define TP_BLK 0 // block types for rsnew
60 #define GI_BLK 1 // global information block
61 #define IOQ_BLK 2 // input output block
63 #define MAGICNUM 219 // magic number for validation of things
65 #define AC_TODOT 0 // convert address to dotted decimal string
66 #define AC_TOADDR 1 // address conversion from dotted dec
67 #define AC_TOADDR6 2 // ipv6 address conversion from string to addr struct
68 #define AC_TOADDR6_4BIND 3 // ipv6 address conversion from string to addr struct suitible for bind
70 #define NO_EVENT 0 // look returns 0 if no event on a fd