Merge "[Epic-ID: ODUHIGH-576][Task-ID: ODUHIGH-579] | Databse Creation"
[o-du/l2.git] / src / 5gnrmac / lwr_mac_nfapi.h
1  /*******************************************************************************
2  ################################################################################
3  #   Copyright (c) [2017-2019] [Radisys]                                        #
4  #                                                                              #
5  #   Licensed under the Apache License, Version 2.0 (the "License");            #
6  #   you may not use this file except in compliance with the License.           #
7  #   You may obtain a copy of the License at                                    #
8  #                                                                              #
9  #       http://www.apache.org/licenses/LICENSE-2.0                             #
10  #                                                                              #
11  #   Unless required by applicable law or agreed to in writing, software        #
12  #   distributed under the License is distributed on an "AS IS" BASIS,          #
13  #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
14  #   See the License for the specific language governing permissions and        #
15  #   limitations under the License.                                             #
16  ################################################################################
17  *******************************************************************************/
18
19  #ifndef _LWR_MAC_NFAPI_H_
20  #define _LWR_MAC_NFAPI_H_
21
22 #include "nfapi_interface.h"
23
24 typedef struct nfapiTransportInfo
25 {
26    uint32_t         assocId;
27    uint8_t          srcIpv4Address[4];   /*Src :: PNF Address Details*/
28    uint16_t         srcIpv4Port;          
29    uint8_t          destIpv4Address[4];  /*Dest :: VNF Address Details*/
30    uint16_t         destIpv4Port;
31    CmInetFd         sockFd;           /* Socket file descriptor */
32    CmInetNetAddrLst addrLst;      /* Refers to the destinaiton Addr Lst in CmInetNetAddrLst format */
33    CmInetNetAddr    ipNetAddr;    /* Refers to the destination Addr in CmInetNet Addr format */
34    
35    /*TODO: later also add the IPV6 support*/
36
37 }NfapiTransportInfo;
38
39 typedef struct nfapiTimingInfo
40 {
41    uint32_t  dl_tti_offset;
42    uint32_t  ul_tti_offset;
43    uint32_t  ul_dci_offset;
44    uint32_t  tx_data_offset;
45    uint16_t  timingWindow;
46    uint8_t   timingInfoMode;
47
48 }NfapiTimingInfo;
49
50 typedef struct nfapiPnfConfig
51 {
52    nFapi_pnf_state  pnfState;
53    uint16_t         max_phys;
54    NfapiTimingInfo  vnfTimingCfg;
55 }NfapiPnfConfig;
56
57 typedef struct nfapiSyncInfo
58 {
59     uint8_t   phyId;
60     uint8_t   inSync;
61     uint32_t  prev_t1;
62     uint32_t  prev_t2;
63     uint32_t  prev_t3;
64     uint8_t       sfn;
65     uint8_t       slot;
66     NfapiSyncInfo *next;
67 }NfapiSyncInfo;
68
69 typedef struct nfapiP7VnfInfo
70 {
71    uint32_t      sfnStartTime;
72    uint32_t      slotStartTime;
73    NfapiSyncInfo *p7SyncInfo;
74 }NfapiP7VnfInfo;
75
76 typedef struct nfapiVnfDb
77 {
78    NfapiTransportInfo  p5TransInfo;
79    NfapiTransportInfo  p7TransInfo;
80    NfapiPnfConfig      pnfConfig;
81    NfapiSyncInfo       vnfSynchInfo;
82    NfapiP7VnfInfo      vnfP7Info;   
83 }NfapiVnfDb;
84
85  #endif