if4_tools.h 2.2 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
/*******************************************************************************
    OpenAirInterface
    Copyright(c) 1999 - 2014 Eurecom

    OpenAirInterface is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.


    OpenAirInterface is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with OpenAirInterface.The full GNU General Public License is
   included in this distribution in the file called "COPYING". If not,
   see <http://www.gnu.org/licenses/>.

  Contact Information
  OpenAirInterface Admin: openair_admin@eurecom.fr
  OpenAirInterface Tech : openair_tech@eurecom.fr
  OpenAirInterface Dev  : openair4g-devel@lists.eurecom.fr

  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE

 *******************************************************************************/

/*! \file PHY/LTE_TRANSPORT/if4_tools.h
* \brief 
* \author S. Sandeep Kumar, Raymond Knopp
* \date 2016
* \version 0.1
* \company Eurecom
* \email: ee13b1025@iith.ac.in, knopp@eurecom.fr 
* \note
* \warning
*/

41
#include "PHY/defs.h"
42

43 44
/// Macro for IF4 packet type
#define IF4_PACKET_TYPE 0x080A 
45 46 47 48
#define IF4_PULFFT 0x0019 
#define IF4_PDLFFT 0x0020
#define IF4_PRACH 0x0021

Sandeep Kumar's avatar
Sandeep Kumar committed
49
struct IF4_header {  
50
  /// Type
51
  uint16_t type; 
52
  /// Sub-Type
53
  uint16_t sub_type;
54
  /// Reserved
55
  uint32_t rsvd;
56
  /// Frame Status
57
  uint32_t frame_status;
58

Sandeep Kumar's avatar
Sandeep Kumar committed
59
} __attribute__ ((__packed__));
60

Sandeep Kumar's avatar
Sandeep Kumar committed
61 62
typedef struct IF4_header IF4_header_t;
#define sizeof_IF4_header_t 12 
63

Sandeep Kumar's avatar
Sandeep Kumar committed
64
void gen_IF4_dl_header(IF4_header_t*, int, int);
65

Sandeep Kumar's avatar
Sandeep Kumar committed
66
void gen_IF4_ul_header(IF4_header_t*, int, int);
67

Sandeep Kumar's avatar
Sandeep Kumar committed
68
void gen_IF4_prach_header(IF4_header_t*, int, int);
69

70
void send_IF4(PHY_VARS_eNB*, int, int, uint16_t, int);
71

72
void recv_IF4(PHY_VARS_eNB*, int*, int*, uint16_t*, uint32_t*);
73 74

void malloc_IF4_buffer(PHY_VARS_eNB*);