1 // vim: noet sw=4 ts=4:
3 ==================================================================================
4 Copyright (c) 2020 Nokia
5 Copyright (c) 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 *****************************************************************************
24 Mnemonic: sitransport.h
25 Abstract: This file contains definitions needed to set up specific macros
26 that allow for an underlying transport mechanism such as f-stack
27 to be substituted for the normal system calls. The underlying
28 transport must support the same socket, bind, listen, etc.,
29 calls and call parameters as the system calls.
32 Author: E. Scott Daniels
35 ****************************************************************************
38 #ifndef _sitransport_h
42 #include "ff_config.h"
46 // TCP/UDP stack provied by f-stack
48 #define LISTEN ff_listen
49 #define SOCKET ff_socket
50 #define CONNECT ff_connect
51 #define ACCEPT ff_accept
52 #define CLOSE ff_close
53 #define SHUTDOWN ff_shutdown
54 #define GETSOCKOPT ff_getscokopt
55 #define SETSOCKOPT ff_setsockopt
57 #define WRITE ff_write
59 #define SENDTO ff_sendto
61 #define RECVMSG ff_recvmsg
62 #define RECVFROM ff_recvfrom
66 // support normal system TCP/UDP stack
70 #define CONNECT connect
73 #define SHUTDOWN shutdown
74 #define GETSOCKOPT getscokopt
75 #define SETSOCKOPT setsockopt
81 #define RECVFROM recvfrom
82 #define RECVMSG recvmsg