Add SI95 transport support
[ric-plt/lib/rmr.git] / src / rmr / si / src / si95 / sitransport.h
1 // vim: noet sw=4 ts=4:
2 /*
3 ==================================================================================
4     Copyright (c) 2020 Nokia
5     Copyright (c) 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:       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.
30
31         Date:           5 November 2019 
32         Author:         E. Scott Daniels
33
34
35 ****************************************************************************
36 */
37
38 #ifndef _sitransport_h
39
40 #ifdef F_STACK
41
42 #include "ff_config.h"
43 #include "ff_api.h"
44
45
46 // TCP/UDP stack provied by f-stack
47 #define BIND            ff_bind
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
56 #define READ            ff_read
57 #define WRITE           ff_write
58 #define SEND            ff_send
59 #define SENDTO          ff_sendto
60 #define RECV            ff_recv
61 #define RECVMSG         ff_recvmsg
62 #define RECVFROM        ff_recvfrom
63
64 #else
65
66 // support normal system TCP/UDP stack
67 #define BIND            bind
68 #define LISTEN          listen
69 #define SOCKET          socket
70 #define CONNECT         connect
71 #define ACCEPT          accept
72 #define CLOSE           close
73 #define SHUTDOWN        shutdown
74 #define GETSOCKOPT      getscokopt 
75 #define SETSOCKOPT      setsockopt
76 #define READ            read
77 #define WRITE           write
78 #define SEND            send
79 #define SENDTO          sendto
80 #define RECV            recv
81 #define RECVFROM        recvfrom
82 #define RECVMSG         recvmsg
83
84 #endif
85
86
87
88 #endif