Commit ab135d62 authored by laurent's avatar laurent

formating

parent 46231a5d
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. except in compliance with the License.
* You may obtain a copy of the License at You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698 http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and See the License for the specific language governing permissions and
* limitations under the License. limitations under the License.
*------------------------------------------------------------------------------- -------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance: For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org contact@openairinterface.org
*/ */
#ifndef ASN1_CONVERSIONS_H_ #ifndef ASN1_CONVERSIONS_H_
#define ASN1_CONVERSIONS_H_ #define ASN1_CONVERSIONS_H_
...@@ -28,25 +28,23 @@ ...@@ -28,25 +28,23 @@
//-----------------------begin func ------------------- //-----------------------begin func -------------------
/*! \fn uint8_t BIT_STRING_to_uint8(BIT_STRING_t *) /*! \fn uint8_t BIT_STRING_to_uint8(BIT_STRING_t *)
*\brief This function extract at most a 8 bits value from a BIT_STRING_t object, the exact bits number depend on the BIT_STRING_t contents. \brief This function extract at most a 8 bits value from a BIT_STRING_t object, the exact bits number depend on the BIT_STRING_t contents.
*\param[in] pointer to the BIT_STRING_t object. \param[in] pointer to the BIT_STRING_t object.
*\return the extracted value. \return the extracted value.
*/ */
static inline uint8_t BIT_STRING_to_uint8(BIT_STRING_t *asn) { static inline uint8_t BIT_STRING_to_uint8(BIT_STRING_t *asn) {
DevCheck ((asn->size == 1), asn->size, 0, 0); DevCheck ((asn->size == 1), asn->size, 0, 0);
return asn->buf[0] >> asn->bits_unused; return asn->buf[0] >> asn->bits_unused;
} }
/*! \fn uint16_t BIT_STRING_to_uint16(BIT_STRING_t *) /*! \fn uint16_t BIT_STRING_to_uint16(BIT_STRING_t *)
*\brief This function extract at most a 16 bits value from a BIT_STRING_t object, the exact bits number depend on the BIT_STRING_t contents. \brief This function extract at most a 16 bits value from a BIT_STRING_t object, the exact bits number depend on the BIT_STRING_t contents.
*\param[in] pointer to the BIT_STRING_t object. \param[in] pointer to the BIT_STRING_t object.
*\return the extracted value. \return the extracted value.
*/ */
static inline uint16_t BIT_STRING_to_uint16(BIT_STRING_t *asn) { static inline uint16_t BIT_STRING_to_uint16(BIT_STRING_t *asn) {
uint16_t result = 0; uint16_t result = 0;
int index = 0; int index = 0;
DevCheck ((asn->size > 0) && (asn->size <= 2), asn->size, 0, 0); DevCheck ((asn->size > 0) && (asn->size <= 2), asn->size, 0, 0);
switch (asn->size) { switch (asn->size) {
...@@ -65,48 +63,44 @@ static inline uint16_t BIT_STRING_to_uint16(BIT_STRING_t *asn) { ...@@ -65,48 +63,44 @@ static inline uint16_t BIT_STRING_to_uint16(BIT_STRING_t *asn) {
} }
/*! \fn uint32_t BIT_STRING_to_uint32(BIT_STRING_t *) /*! \fn uint32_t BIT_STRING_to_uint32(BIT_STRING_t *)
*\brief This function extract at most a 32 bits value from a BIT_STRING_t object, the exact bits number depend on the BIT_STRING_t contents. \brief This function extract at most a 32 bits value from a BIT_STRING_t object, the exact bits number depend on the BIT_STRING_t contents.
*\param[in] pointer to the BIT_STRING_t object. \param[in] pointer to the BIT_STRING_t object.
*\return the extracted value. \return the extracted value.
*/ */
static inline uint32_t BIT_STRING_to_uint32(BIT_STRING_t *asn) { static inline uint32_t BIT_STRING_to_uint32(BIT_STRING_t *asn) {
uint32_t result = 0; uint32_t result = 0;
int index; int index;
int shift; int shift;
DevCheck ((asn->size > 0) && (asn->size <= 4), asn->size, 0, 0); DevCheck ((asn->size > 0) && (asn->size <= 4), asn->size, 0, 0);
shift = ((asn->size - 1) * 8) - asn->bits_unused; shift = ((asn->size - 1) * 8) - asn->bits_unused;
for (index = 0; index < (asn->size - 1); index++) { for (index = 0; index < (asn->size - 1); index++) {
result |= asn->buf[index] << shift; result |= asn->buf[index] << shift;
shift -= 8; shift -= 8;
} }
result |= asn->buf[index] >> asn->bits_unused; result |= asn->buf[index] >> asn->bits_unused;
return result; return result;
} }
/*! \fn uint64_t BIT_STRING_to_uint64(BIT_STRING_t *) /*! \fn uint64_t BIT_STRING_to_uint64(BIT_STRING_t *)
*\brief This function extract at most a 64 bits value from a BIT_STRING_t object, the exact bits number depend on the BIT_STRING_t contents. \brief This function extract at most a 64 bits value from a BIT_STRING_t object, the exact bits number depend on the BIT_STRING_t contents.
*\param[in] pointer to the BIT_STRING_t object. \param[in] pointer to the BIT_STRING_t object.
*\return the extracted value. \return the extracted value.
*/ */
static inline uint64_t BIT_STRING_to_uint64(BIT_STRING_t *asn) { static inline uint64_t BIT_STRING_to_uint64(BIT_STRING_t *asn) {
uint64_t result = 0; uint64_t result = 0;
int index; int index;
int shift; int shift;
DevCheck ((asn->size > 0) && (asn->size <= 8), asn->size, 0, 0); DevCheck ((asn->size > 0) && (asn->size <= 8), asn->size, 0, 0);
shift = ((asn->size - 1) * 8) - asn->bits_unused; shift = ((asn->size - 1) * 8) - asn->bits_unused;
for (index = 0; index < (asn->size - 1); index++) { for (index = 0; index < (asn->size - 1); index++) {
result |= asn->buf[index] << shift; result |= asn->buf[index] << shift;
shift -= 8; shift -= 8;
} }
result |= asn->buf[index] >> asn->bits_unused; result |= asn->buf[index] >> asn->bits_unused;
return result; return result;
} }
......
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. except in compliance with the License.
* You may obtain a copy of the License at You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698 http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and See the License for the specific language governing permissions and
* limitations under the License. limitations under the License.
*------------------------------------------------------------------------------- -------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance: For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org contact@openairinterface.org
*/ */
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <inttypes.h> #include <inttypes.h>
#ifdef CMAKER #ifdef CMAKER
#include <platform_types.h> #include <platform_types.h>
#endif #endif
#if defined(ENB_MODE) #if defined(ENB_MODE)
# define display_backtrace() #define display_backtrace()
#else #else
# include "backtrace.h" #include "backtrace.h"
#endif #endif
#ifndef ASSERTIONS_H_ #ifndef ASSERTIONS_H_
...@@ -37,23 +37,23 @@ ...@@ -37,23 +37,23 @@
void output_log_mem(void); void output_log_mem(void);
#define _Assert_Exit_ \ #define _Assert_Exit_ \
{ \ { \
fprintf(stderr, "\nExiting execution\n"); \ fprintf(stderr, "\nExiting execution\n"); \
display_backtrace(); \ display_backtrace(); \
fflush(stdout); \ fflush(stdout); \
fflush(stderr); \ fflush(stderr); \
exit(EXIT_FAILURE); \ exit(EXIT_FAILURE); \
} }
#define _Assert_(cOND, aCTION, fORMAT, aRGS...) \ #define _Assert_(cOND, aCTION, fORMAT, aRGS...) \
do { \ do { \
if (!(cOND)) { \ if (!(cOND)) { \
fprintf(stderr, "\nAssertion ("#cOND") failed!\n" \ fprintf(stderr, "\nAssertion ("#cOND") failed!\n" \
"In %s() %s:%d\n" fORMAT, \ "In %s() %s:%d\n" fORMAT, \
__FUNCTION__, __FILE__, __LINE__, ##aRGS); \ __FUNCTION__, __FILE__, __LINE__, ##aRGS); \
aCTION; \ aCTION; \
} \ } \
} while(0) } while(0)
#define AssertFatal(cOND, fORMAT, aRGS...) _Assert_(cOND, _Assert_Exit_, fORMAT, ##aRGS) #define AssertFatal(cOND, fORMAT, aRGS...) _Assert_(cOND, _Assert_Exit_, fORMAT, ##aRGS)
...@@ -62,11 +62,11 @@ do { \ ...@@ -62,11 +62,11 @@ do { \
#define DevCheck(cOND, vALUE1, vALUE2, vALUE3) \ #define DevCheck(cOND, vALUE1, vALUE2, vALUE3) \
_Assert_(cOND, _Assert_Exit_, #vALUE1 ": %" PRIdMAX "\n" #vALUE2 ": %" PRIdMAX "\n" #vALUE3 ": %" PRIdMAX "\n\n", \ _Assert_(cOND, _Assert_Exit_, #vALUE1 ": %" PRIdMAX "\n" #vALUE2 ": %" PRIdMAX "\n" #vALUE3 ": %" PRIdMAX "\n\n", \
(intmax_t)vALUE1, (intmax_t)vALUE2, (intmax_t)vALUE3) (intmax_t)vALUE1, (intmax_t)vALUE2, (intmax_t)vALUE3)
#define DevCheck4(cOND, vALUE1, vALUE2, vALUE3, vALUE4) \ #define DevCheck4(cOND, vALUE1, vALUE2, vALUE3, vALUE4) \
_Assert_(cOND, _Assert_Exit_, #vALUE1": %" PRIdMAX "\n" #vALUE2 ": %" PRIdMAX "\n" #vALUE3 ": %" PRIdMAX "\n" #vALUE4 ": %" PRIdMAX "\n\n", \ _Assert_(cOND, _Assert_Exit_, #vALUE1": %" PRIdMAX "\n" #vALUE2 ": %" PRIdMAX "\n" #vALUE3 ": %" PRIdMAX "\n" #vALUE4 ": %" PRIdMAX "\n\n", \
(intmax_t)vALUE1, (intmax_t)vALUE2, (intmax_t)vALUE3, (intmax_t)vALUE4) (intmax_t)vALUE1, (intmax_t)vALUE2, (intmax_t)vALUE3, (intmax_t)vALUE4)
#define DevParam(vALUE1, vALUE2, vALUE3) DevCheck(0, vALUE1, vALUE2, vALUE3) #define DevParam(vALUE1, vALUE2, vALUE3) DevCheck(0, vALUE1, vALUE2, vALUE3)
...@@ -76,7 +76,7 @@ _Assert_(cOND, _Assert_Exit_, #vALUE1": %" PRIdMAX "\n" #vALUE2 ": %" PRIdMAX "\ ...@@ -76,7 +76,7 @@ _Assert_(cOND, _Assert_Exit_, #vALUE1": %" PRIdMAX "\n" #vALUE2 ": %" PRIdMAX "\
#define DevMessage(mESSAGE) _Assert_(0, _Assert_Exit_, #mESSAGE) #define DevMessage(mESSAGE) _Assert_(0, _Assert_Exit_, #mESSAGE)
#define CHECK_INIT_RETURN(fCT) \ #define CHECK_INIT_RETURN(fCT) \
do { \ do { \
int fct_ret; \ int fct_ret; \
if ((fct_ret = (fCT)) != 0) { \ if ((fct_ret = (fCT)) != 0) { \
fprintf(stderr, "Function "#fCT" has failed\n" \ fprintf(stderr, "Function "#fCT" has failed\n" \
...@@ -85,6 +85,6 @@ do { \ ...@@ -85,6 +85,6 @@ do { \
fflush(stderr); \ fflush(stderr); \
exit(EXIT_FAILURE); \ exit(EXIT_FAILURE); \
} \ } \
} while(0) } while(0)
#endif /* ASSERTIONS_H_ */ #endif /* ASSERTIONS_H_ */
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. except in compliance with the License.
* You may obtain a copy of the License at You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698 http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and See the License for the specific language governing permissions and
* limitations under the License. limitations under the License.
*------------------------------------------------------------------------------- -------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance: For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org contact@openairinterface.org
*/ */
#include <pthread.h> #include <pthread.h>
#include <stdio.h> #include <stdio.h>
...@@ -31,17 +31,17 @@ ...@@ -31,17 +31,17 @@
#include "backtrace.h" #include "backtrace.h"
/* Obtain a backtrace and print it to stdout. */ /* Obtain a backtrace and print it to stdout. */
void display_backtrace(void) void display_backtrace(void) {
{
void *array[10]; void *array[10];
size_t size; size_t size;
char **strings; char **strings;
size_t i; size_t i;
char* test=getenv("NO_BACKTRACE"); char *test=getenv("NO_BACKTRACE");
if (test!=0) *((int*)0)=0;
if (test!=0) *((int *)0)=0;
size = backtrace(array, 10); size = backtrace(array, 10);
strings = backtrace_symbols(array, size); strings = backtrace_symbols(array, size);
printf("Obtained %zd stack frames.\n", size); printf("Obtained %zd stack frames.\n", size);
for (i = 0; i < size; i++) for (i = 0; i < size; i++)
...@@ -50,8 +50,7 @@ void display_backtrace(void) ...@@ -50,8 +50,7 @@ void display_backtrace(void)
free(strings); free(strings);
} }
void backtrace_handle_signal(siginfo_t *info) void backtrace_handle_signal(siginfo_t *info) {
{
display_backtrace(); display_backtrace();
//exit(EXIT_FAILURE); //exit(EXIT_FAILURE);
} }
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. except in compliance with the License.
* You may obtain a copy of the License at You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698 http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and See the License for the specific language governing permissions and
* limitations under the License. limitations under the License.
*------------------------------------------------------------------------------- -------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance: For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org contact@openairinterface.org
*/ */
#include <signal.h> #include <signal.h>
......
This diff is collapsed.
This diff is collapsed.
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. except in compliance with the License.
* You may obtain a copy of the License at You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698 http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and See the License for the specific language governing permissions and
* limitations under the License. limitations under the License.
*------------------------------------------------------------------------------- -------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance: For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org contact@openairinterface.org
*/ */
/* file: crc_byte.c /* file: crc_byte.c
purpose: generate 3GPP LTE CRCs. Byte-oriented implementation of CRC's purpose: generate 3GPP LTE CRCs. Byte-oriented implementation of CRC's
...@@ -38,15 +38,15 @@ ...@@ -38,15 +38,15 @@
// Reference 38.212 V15.1.1 Section 5.1 (36-212 v8.6.0 , pp 8-9) // Reference 38.212 V15.1.1 Section 5.1 (36-212 v8.6.0 , pp 8-9)
// The highest degree is set by default // The highest degree is set by default
/** 1000 0110 0100 1100 1111 1011 D^24 + D^23 + D^18 + D^17 + D^14 + D^11 + D^10 + D^7 + D^6 + D^5 + D^4 + D^3 + D + 1 */ /** 1000 0110 0100 1100 1111 1011 D^24 + D^23 + D^18 + D^17 + D^14 + D^11 + D^10 + D^7 + D^6 + D^5 + D^4 + D^3 + D + 1 */
static const uint32_t poly24a = 0x864cfb00; //static const uint32_t poly24a = 0x864cfb00;
/** 1000 0000 0000 0000 0110 0011 D^24 + D^23 + D^6 + D^5 + D + 1 */ /** 1000 0000 0000 0000 0110 0011 D^24 + D^23 + D^6 + D^5 + D + 1 */
static const uint32_t poly24b = 0x80006300; //static const uint32_t poly24b = 0x80006300;
/** 0001 0000 0010 0001 D^16 + D^12 + D^5 + 1 */ /** 0001 0000 0010 0001 D^16 + D^12 + D^5 + 1 */
static const uint32_t poly16 = 0x10210000; //static const uint32_t poly16 = 0x10210000;
/** 1000 0000 1111 D^12 + D^11 + D^3 + D^2 + D + 1 */ /** 1000 0000 1111 D^12 + D^11 + D^3 + D^2 + D + 1 */
static const uint32_t poly12 = 0x80F00000; //static const uint32_t poly12 = 0x80F00000;
/** 1001 1011 D^8 + D^7 + D^4 + D^3 + D + 1 */ /** 1001 1011 D^8 + D^7 + D^4 + D^3 + D + 1 */
static const uint32_t poly8 = 0x9B000000; //static const uint32_t poly8 = 0x9B000000;
// The following arrays are generated with the function 'crcTableInit' // The following arrays are generated with the function 'crcTableInit'
/** Encoding table for CRC 24A */ /** Encoding table for CRC 24A */
...@@ -65,24 +65,18 @@ static const uint16_t crc12Table[256] = {0x0, 0x80f0, 0x8110, 0x1e0, 0x82d0, 0x2 ...@@ -65,24 +65,18 @@ static const uint16_t crc12Table[256] = {0x0, 0x80f0, 0x8110, 0x1e0, 0x82d0, 0x2
static const uint8_t crc8Table[256] = {0x0, 0x9b, 0xad, 0x36, 0xc1, 0x5a, 0x6c, 0xf7, 0x19, 0x82, 0xb4, 0x2f, 0xd8, 0x43, 0x75, 0xee, 0x32, 0xa9, 0x9f, 0x4, 0xf3, 0x68, 0x5e, 0xc5, 0x2b, 0xb0, 0x86, 0x1d, 0xea, 0x71, 0x47, 0xdc, 0x64, 0xff, 0xc9, 0x52, 0xa5, 0x3e, 0x8, 0x93, 0x7d, 0xe6, 0xd0, 0x4b, 0xbc, 0x27, 0x11, 0x8a, 0x56, 0xcd, 0xfb, 0x60, 0x97, 0xc, 0x3a, 0xa1, 0x4f, 0xd4, 0xe2, 0x79, 0x8e, 0x15, 0x23, 0xb8, 0xc8, 0x53, 0x65, 0xfe, 0x9, 0x92, 0xa4, 0x3f, 0xd1, 0x4a, 0x7c, 0xe7, 0x10, 0x8b, 0xbd, 0x26, 0xfa, 0x61, 0x57, 0xcc, 0x3b, 0xa0, 0x96, 0xd, 0xe3, 0x78, 0x4e, 0xd5, 0x22, 0xb9, 0x8f, 0x14, 0xac, 0x37, 0x1, 0x9a, 0x6d, 0xf6, 0xc0, 0x5b, 0xb5, 0x2e, 0x18, 0x83, 0x74, 0xef, 0xd9, 0x42, 0x9e, 0x5, 0x33, 0xa8, 0x5f, 0xc4, 0xf2, 0x69, 0x87, 0x1c, 0x2a, 0xb1, 0x46, 0xdd, 0xeb, 0x70, 0xb, 0x90, 0xa6, 0x3d, 0xca, 0x51, 0x67, 0xfc, 0x12, 0x89, 0xbf, 0x24, 0xd3, 0x48, 0x7e, 0xe5, 0x39, 0xa2, 0x94, 0xf, 0xf8, 0x63, 0x55, 0xce, 0x20, 0xbb, 0x8d, 0x16, 0xe1, 0x7a, 0x4c, 0xd7, 0x6f, 0xf4, 0xc2, 0x59, 0xae, 0x35, 0x3, 0x98, 0x76, 0xed, 0xdb, 0x40, 0xb7, 0x2c, 0x1a, 0x81, 0x5d, 0xc6, 0xf0, 0x6b, 0x9c, 0x7, 0x31, 0xaa, 0x44, 0xdf, 0xe9, 0x72, 0x85, 0x1e, 0x28, 0xb3, 0xc3, 0x58, 0x6e, 0xf5, 0x2, 0x99, 0xaf, 0x34, 0xda, 0x41, 0x77, 0xec, 0x1b, 0x80, 0xb6, 0x2d, 0xf1, 0x6a, 0x5c, 0xc7, 0x30, 0xab, 0x9d, 0x6, 0xe8, 0x73, 0x45, 0xde, 0x29, 0xb2, 0x84, 0x1f, 0xa7, 0x3c, 0xa, 0x91, 0x66, 0xfd, 0xcb, 0x50, 0xbe, 0x25, 0x13, 0x88, 0x7f, 0xe4, 0xd2, 0x49, 0x95, 0xe, 0x38, 0xa3, 0x54, 0xcf, 0xf9, 0x62, 0x8c, 0x17, 0x21, 0xba, 0x4d, 0xd6, 0xe0, 0x7b}; static const uint8_t crc8Table[256] = {0x0, 0x9b, 0xad, 0x36, 0xc1, 0x5a, 0x6c, 0xf7, 0x19, 0x82, 0xb4, 0x2f, 0xd8, 0x43, 0x75, 0xee, 0x32, 0xa9, 0x9f, 0x4, 0xf3, 0x68, 0x5e, 0xc5, 0x2b, 0xb0, 0x86, 0x1d, 0xea, 0x71, 0x47, 0xdc, 0x64, 0xff, 0xc9, 0x52, 0xa5, 0x3e, 0x8, 0x93, 0x7d, 0xe6, 0xd0, 0x4b, 0xbc, 0x27, 0x11, 0x8a, 0x56, 0xcd, 0xfb, 0x60, 0x97, 0xc, 0x3a, 0xa1, 0x4f, 0xd4, 0xe2, 0x79, 0x8e, 0x15, 0x23, 0xb8, 0xc8, 0x53, 0x65, 0xfe, 0x9, 0x92, 0xa4, 0x3f, 0xd1, 0x4a, 0x7c, 0xe7, 0x10, 0x8b, 0xbd, 0x26, 0xfa, 0x61, 0x57, 0xcc, 0x3b, 0xa0, 0x96, 0xd, 0xe3, 0x78, 0x4e, 0xd5, 0x22, 0xb9, 0x8f, 0x14, 0xac, 0x37, 0x1, 0x9a, 0x6d, 0xf6, 0xc0, 0x5b, 0xb5, 0x2e, 0x18, 0x83, 0x74, 0xef, 0xd9, 0x42, 0x9e, 0x5, 0x33, 0xa8, 0x5f, 0xc4, 0xf2, 0x69, 0x87, 0x1c, 0x2a, 0xb1, 0x46, 0xdd, 0xeb, 0x70, 0xb, 0x90, 0xa6, 0x3d, 0xca, 0x51, 0x67, 0xfc, 0x12, 0x89, 0xbf, 0x24, 0xd3, 0x48, 0x7e, 0xe5, 0x39, 0xa2, 0x94, 0xf, 0xf8, 0x63, 0x55, 0xce, 0x20, 0xbb, 0x8d, 0x16, 0xe1, 0x7a, 0x4c, 0xd7, 0x6f, 0xf4, 0xc2, 0x59, 0xae, 0x35, 0x3, 0x98, 0x76, 0xed, 0xdb, 0x40, 0xb7, 0x2c, 0x1a, 0x81, 0x5d, 0xc6, 0xf0, 0x6b, 0x9c, 0x7, 0x31, 0xaa, 0x44, 0xdf, 0xe9, 0x72, 0x85, 0x1e, 0x28, 0xb3, 0xc3, 0x58, 0x6e, 0xf5, 0x2, 0x99, 0xaf, 0x34, 0xda, 0x41, 0x77, 0xec, 0x1b, 0x80, 0xb6, 0x2d, 0xf1, 0x6a, 0x5c, 0xc7, 0x30, 0xab, 0x9d, 0x6, 0xe8, 0x73, 0x45, 0xde, 0x29, 0xb2, 0x84, 0x1f, 0xa7, 0x3c, 0xa, 0x91, 0x66, 0xfd, 0xcb, 0x50, 0xbe, 0x25, 0x13, 0x88, 0x7f, 0xe4, 0xd2, 0x49, 0x95, 0xe, 0x38, 0xa3, 0x54, 0xcf, 0xf9, 0x62, 0x8c, 0x17, 0x21, 0xba, 0x4d, 0xd6, 0xe0, 0x7b};
uint32_t crcbit (uint8_t * inputptr, int32_t octetlen, uint32_t poly) uint32_t crcbit (uint8_t *inputptr, int32_t octetlen, uint32_t poly) {
{
uint32_t i; uint32_t i;
uint32_t crc = 0; uint32_t crc = 0;
uint32_t c; uint32_t c;
while (octetlen-- > 0) while (octetlen-- > 0) {
{
c = (*inputptr++) << 24; c = (*inputptr++) << 24;
for (i = 8; i != 0; i--) for (i = 8; i != 0; i--) {
{ if ( (1 << 31) & (c ^ crc) ) {
if ( (1 << 31) & (c ^ crc) )
{
crc = (crc << 1) ^ poly; crc = (crc << 1) ^ poly;
} } else {
else
{
crc <<= 1; crc <<= 1;
} }
...@@ -96,8 +90,8 @@ uint32_t crcbit (uint8_t * inputptr, int32_t octetlen, uint32_t poly) ...@@ -96,8 +90,8 @@ uint32_t crcbit (uint8_t * inputptr, int32_t octetlen, uint32_t poly)
// CRC table initialization // CRC table initialization
/* /*
void crcTableInit (void) void crcTableInit (void)
{ {
uint8_t c = 0; uint8_t c = 0;
do do
...@@ -109,99 +103,84 @@ void crcTableInit (void) ...@@ -109,99 +103,84 @@ void crcTableInit (void)
crc8Table [c] = (uint8_t) (crcbit (&c, 1, poly8 ) >> 24); crc8Table [c] = (uint8_t) (crcbit (&c, 1, poly8 ) >> 24);
} }
while (++c); while (++c);
} }
*/ */
// Byte by byte implementations, assuming initial byte is 0 padded (in MSB) if necessary // Byte by byte implementations, assuming initial byte is 0 padded (in MSB) if necessary
uint32_t crc24a (uint8_t * inptr, uint32_t bitlen) uint32_t crc24a (uint8_t *inptr, uint32_t bitlen) {
{
int32_t octetlen = bitlen / 8; int32_t octetlen = bitlen / 8;
int32_t resbit = (bitlen % 8); int32_t resbit = (bitlen % 8);
uint32_t crc = 0; uint32_t crc = 0;
while (octetlen-- > 0) while (octetlen-- > 0) {
{
crc = (crc << 8) ^ crc24aTable[(*inptr++) ^ (crc >> 24)]; crc = (crc << 8) ^ crc24aTable[(*inptr++) ^ (crc >> 24)];
} }
if (resbit > 0) if (resbit > 0) {
{
crc = (crc << resbit) ^ crc24aTable[((*inptr) >> (8 - resbit)) ^ (crc >> (32 - resbit))]; crc = (crc << resbit) ^ crc24aTable[((*inptr) >> (8 - resbit)) ^ (crc >> (32 - resbit))];
} }
return crc; return crc;
} }
uint32_t crc24b (uint8_t * inptr, uint32_t bitlen) uint32_t crc24b (uint8_t *inptr, uint32_t bitlen) {
{
int32_t octetlen = bitlen / 8; int32_t octetlen = bitlen / 8;
int32_t resbit = (bitlen % 8); int32_t resbit = (bitlen % 8);
uint32_t crc = 0; uint32_t crc = 0;
while (octetlen-- > 0) while (octetlen-- > 0) {
{
crc = (crc << 8) ^ crc24bTable[(*inptr++) ^ (crc >> 24)]; crc = (crc << 8) ^ crc24bTable[(*inptr++) ^ (crc >> 24)];
} }
if (resbit > 0) if (resbit > 0) {
{
crc = (crc << resbit) ^ crc24bTable[((*inptr) >> (8 - resbit)) ^ (crc >> (32 - resbit))]; crc = (crc << resbit) ^ crc24bTable[((*inptr) >> (8 - resbit)) ^ (crc >> (32 - resbit))];
} }
return crc; return crc;
} }
uint32_t crc16 (uint8_t * inptr, uint32_t bitlen) uint32_t crc16 (uint8_t *inptr, uint32_t bitlen) {
{
int32_t octetlen = bitlen / 8; int32_t octetlen = bitlen / 8;
int32_t resbit = (bitlen % 8); int32_t resbit = (bitlen % 8);
uint32_t crc = 0; uint32_t crc = 0;
while (octetlen-- > 0) while (octetlen-- > 0) {
{
crc = (crc << 8) ^ (crc16Table[(*inptr++) ^ (crc >> 24)] << 16); crc = (crc << 8) ^ (crc16Table[(*inptr++) ^ (crc >> 24)] << 16);
} }
if (resbit > 0) if (resbit > 0) {
{
crc = (crc << resbit) ^ (crc16Table[((*inptr) >> (8 - resbit)) ^ (crc >> (32 - resbit))] << 16); crc = (crc << resbit) ^ (crc16Table[((*inptr) >> (8 - resbit)) ^ (crc >> (32 - resbit))] << 16);
} }
return crc; return crc;
} }
uint32_t crc12 (uint8_t * inptr, uint32_t bitlen) uint32_t crc12 (uint8_t *inptr, uint32_t bitlen) {
{
int32_t octetlen = bitlen / 8; int32_t octetlen = bitlen / 8;
int32_t resbit = (bitlen % 8); int32_t resbit = (bitlen % 8);
uint32_t crc = 0; uint32_t crc = 0;
while (octetlen-- > 0) while (octetlen-- > 0) {
{
crc = (crc << 8) ^ (crc12Table[(*inptr++) ^ (crc >> 24)] << 16); crc = (crc << 8) ^ (crc12Table[(*inptr++) ^ (crc >> 24)] << 16);
} }
if (resbit > 0) if (resbit > 0) {
{
crc = (crc << resbit) ^ (crc12Table[((*inptr) >> (8 - resbit)) ^ (crc >> (32 - resbit))] << 16); crc = (crc << resbit) ^ (crc12Table[((*inptr) >> (8 - resbit)) ^ (crc >> (32 - resbit))] << 16);
} }
return crc; return crc;
} }
uint32_t crc8 (uint8_t * inptr, uint32_t bitlen) uint32_t crc8 (uint8_t *inptr, uint32_t bitlen) {
{
int32_t octetlen = bitlen / 8; int32_t octetlen = bitlen / 8;
int32_t resbit = (bitlen % 8); int32_t resbit = (bitlen % 8);
uint32_t crc = 0; uint32_t crc = 0;
while (octetlen-- > 0) while (octetlen-- > 0) {
{
crc = crc8Table[(*inptr++) ^ (crc >> 24)] << 24; crc = crc8Table[(*inptr++) ^ (crc >> 24)] << 24;
} }
if (resbit > 0) if (resbit > 0) {
{
crc = (crc << resbit) ^ (crc8Table[((*inptr) >> (8 - resbit)) ^ (crc >> (32 - resbit))] << 24); crc = (crc << resbit) ^ (crc8Table[((*inptr) >> (8 - resbit)) ^ (crc >> (32 - resbit))] << 24);
} }
...@@ -213,8 +192,7 @@ uint32_t crc8 (uint8_t * inptr, uint32_t bitlen) ...@@ -213,8 +192,7 @@ uint32_t crc8 (uint8_t * inptr, uint32_t bitlen)
#include <stdio.h> #include <stdio.h>
main() main() {
{
unsigned char test[] = "Thebigredfox"; unsigned char test[] = "Thebigredfox";
crcTableInit(); crcTableInit();
printf("%x\n", crcbit(test, sizeof(test) - 1, poly24)); printf("%x\n", crcbit(test, sizeof(test) - 1, poly24));
......
This diff is collapsed.
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. except in compliance with the License.
* You may obtain a copy of the License at You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698 http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and See the License for the specific language governing permissions and
* limitations under the License. limitations under the License.
*------------------------------------------------------------------------------- -------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance: For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org contact@openairinterface.org
*/ */
/*! \file PHY/defs.h /*! \file PHY/defs.h
\brief Top-level defines and structure definitions \brief Top-level defines and structure definitions
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#ifndef _GNU_SOURCE #ifndef _GNU_SOURCE
#define _GNU_SOURCE #define _GNU_SOURCE
#endif #endif
#include <sched.h> #include <sched.h>
#include <stdio.h> #include <stdio.h>
...@@ -165,7 +165,7 @@ typedef struct { ...@@ -165,7 +165,7 @@ typedef struct {
typedef struct { typedef struct {
/// Parameter: High-speed-flag, see TS 36.211 (5.7.2). \vr{[0..1]} 1 corresponds to Restricted set and 0 to Unrestricted set. /// Parameter: High-speed-flag, see TS 36.211 (5.7.2). \vr{[0..1]} 1 corresponds to Restricted set and 0 to Unrestricted set.
uint8_t highSpeedFlag; uint8_t highSpeedFlag;
/// Parameter: \f$N_\text{CS}\f$, see TS 36.211 (5.7.2). \vr{[0..15]}\n Refer to table 5.7.2-2 for preamble format 0..3 and to table 5.7.2-3 for preamble format 4. /// Parameter: \f$N_\text{CS}\f$, see TS 36.211 (5.7.2). \vr{[0..15]}\n Refer to table 5.7.2-2 for preamble format 0..3 and to table 5.7.2-3 for preamble format 4.
uint8_t zeroCorrelationZoneConfig; uint8_t zeroCorrelationZoneConfig;
/// Parameter: prach-FrequencyOffset, see TS 36.211 (5.7.1). \vr{[0..94]}\n For TDD the value range is dependent on the value of \ref prach_ConfigIndex. /// Parameter: prach-FrequencyOffset, see TS 36.211 (5.7.1). \vr{[0..94]}\n For TDD the value range is dependent on the value of \ref prach_ConfigIndex.
...@@ -910,7 +910,8 @@ enum transmission_access_mode { ...@@ -910,7 +910,8 @@ enum transmission_access_mode {
CANCELED_ACCESS, CANCELED_ACCESS,
UNKNOWN_ACCESS, UNKNOWN_ACCESS,
SCHEDULED_ACCESS, SCHEDULED_ACCESS,
CBA_ACCESS}; CBA_ACCESS
};
typedef enum { typedef enum {
eNodeB_3GPP=0, // classical eNodeB function eNodeB_3GPP=0, // classical eNodeB function
...@@ -981,7 +982,6 @@ typedef uint8_t(encoder_if_t)(uint8_t *input, ...@@ -981,7 +982,6 @@ typedef uint8_t(encoder_if_t)(uint8_t *input,
static inline void wait_sync(char *thread_name) { static inline void wait_sync(char *thread_name) {
printf( "waiting for sync (%s,%d/%p,%p,%p)\n",thread_name,sync_var,&sync_var,&sync_cond,&sync_mutex); printf( "waiting for sync (%s,%d/%p,%p,%p)\n",thread_name,sync_var,&sync_var,&sync_cond,&sync_mutex);
pthread_mutex_lock( &sync_mutex ); pthread_mutex_lock( &sync_mutex );
...@@ -989,19 +989,18 @@ static inline void wait_sync(char *thread_name) { ...@@ -989,19 +989,18 @@ static inline void wait_sync(char *thread_name) {
pthread_cond_wait( &sync_cond, &sync_mutex ); pthread_cond_wait( &sync_cond, &sync_mutex );
pthread_mutex_unlock(&sync_mutex); pthread_mutex_unlock(&sync_mutex);
printf( "got sync (%s)\n", thread_name); printf( "got sync (%s)\n", thread_name);
} }
static inline int wakeup_thread(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) { static inline int wakeup_thread(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) {
if (pthread_mutex_lock(mutex) != 0) { if (pthread_mutex_lock(mutex) != 0) {
LOG_E( PHY, "error locking mutex for %s\n",name); LOG_E( PHY, "error locking mutex for %s\n",name);
exit_fun("nothing to add"); exit_fun("nothing to add");
return(-1); return(-1);
} }
*instance_cnt = *instance_cnt + 1; *instance_cnt = *instance_cnt + 1;
// the thread can now be woken up // the thread can now be woken up
if (pthread_cond_signal(cond) != 0) { if (pthread_cond_signal(cond) != 0) {
LOG_E( PHY, "ERROR pthread_cond_signal\n"); LOG_E( PHY, "ERROR pthread_cond_signal\n");
...@@ -1031,11 +1030,11 @@ static inline int wait_on_condition(pthread_mutex_t *mutex,pthread_cond_t *cond, ...@@ -1031,11 +1030,11 @@ static inline int wait_on_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,
exit_fun("nothing to add"); exit_fun("nothing to add");
return(-1); return(-1);
} }
return(0); return(0);
} }
static inline int wait_on_busy_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) { static inline int wait_on_busy_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) {
if (pthread_mutex_lock(mutex) != 0) { if (pthread_mutex_lock(mutex) != 0) {
LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s\n",name); LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s\n",name);
exit_fun("nothing to add"); exit_fun("nothing to add");
...@@ -1053,11 +1052,11 @@ static inline int wait_on_busy_condition(pthread_mutex_t *mutex,pthread_cond_t * ...@@ -1053,11 +1052,11 @@ static inline int wait_on_busy_condition(pthread_mutex_t *mutex,pthread_cond_t *
exit_fun("nothing to add"); exit_fun("nothing to add");
return(-1); return(-1);
} }
return(0); return(0);
} }
static inline int release_thread(pthread_mutex_t *mutex,int *instance_cnt,char *name) { static inline int release_thread(pthread_mutex_t *mutex,int *instance_cnt,char *name) {
if (pthread_mutex_lock(mutex) != 0) { if (pthread_mutex_lock(mutex) != 0) {
LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s\n",name); LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s\n",name);
exit_fun("nothing to add"); exit_fun("nothing to add");
...@@ -1071,6 +1070,7 @@ static inline int release_thread(pthread_mutex_t *mutex,int *instance_cnt,char * ...@@ -1071,6 +1070,7 @@ static inline int release_thread(pthread_mutex_t *mutex,int *instance_cnt,char *
exit_fun("nothing to add"); exit_fun("nothing to add");
return(-1); return(-1);
} }
return(0); return(0);
} }
......
This diff is collapsed.
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. except in compliance with the License.
* You may obtain a copy of the License at You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698 http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and See the License for the specific language governing permissions and
* limitations under the License. limitations under the License.
*------------------------------------------------------------------------------- -------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance: For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org contact@openairinterface.org
*/ */
openair0_device openair0; openair0_device openair0;
volatile int oai_exit=0; volatile int oai_exit=0;
void exit_function(const char* file, const char* function, const int line,const char *s) { void exit_function(const char *file, const char *function, const int line,const char *s) {
const char * msg= s==NULL ? "no comment": s; const char *msg= s==NULL ? "no comment": s;
printf("Exiting at: %s:%d %s(), %s\n", file, line, function, msg); printf("Exiting at: %s:%d %s(), %s\n", file, line, function, msg);
exit(-1); exit(-1);
} }
......
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. except in compliance with the License.
* You may obtain a copy of the License at You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698 http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and See the License for the specific language governing permissions and
* limitations under the License. limitations under the License.
*------------------------------------------------------------------------------- -------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance: For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org contact@openairinterface.org
*/ */
/* /*
platform_types.h platform_types.h
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
# define __PLATFORM_TYPES_H__ # define __PLATFORM_TYPES_H__
#if !defined(NAS_NETLINK) #if !defined(NAS_NETLINK)
#include <stdint.h> #include <stdint.h>
#endif #endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -39,22 +39,22 @@ ...@@ -39,22 +39,22 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
/* boolean_t is also defined in openair2/COMMON/commonDef.h, /* boolean_t is also defined in openair2/COMMON/commonDef.h,
* let's protect potential redefinition let's protect potential redefinition
*/ */
#ifndef _BOOLEAN_T_DEFINED_ #ifndef _BOOLEAN_T_DEFINED_
#define _BOOLEAN_T_DEFINED_ #define _BOOLEAN_T_DEFINED_
typedef signed char boolean_t; typedef signed char boolean_t;
#if !defined(TRUE) #if !defined(TRUE)
#define TRUE (boolean_t)0x01 #define TRUE (boolean_t)0x01
#endif #endif
#if !defined(FALSE) #if !defined(FALSE)
#define FALSE (boolean_t)0x00 #define FALSE (boolean_t)0x00
#endif #endif
#define BOOL_NOT(b) (b^TRUE) #define BOOL_NOT(b) (b^TRUE)
#endif /* _BOOLEAN_T_DEFINED_ */ #endif /* _BOOLEAN_T_DEFINED_ */
...@@ -182,19 +182,19 @@ typedef uint32_t m_tmsi_t; ...@@ -182,19 +182,19 @@ typedef uint32_t m_tmsi_t;
//Random UE identity length = 40 bits //Random UE identity length = 40 bits
#if ! defined(NOT_A_RANDOM_UE_IDENTITY) #if ! defined(NOT_A_RANDOM_UE_IDENTITY)
#define NOT_A_RANDOM_UE_IDENTITY (uint64_t)0xFFFFFFFF #define NOT_A_RANDOM_UE_IDENTITY (uint64_t)0xFFFFFFFF
#endif #endif
#if ! defined(NOT_A_RNTI) #if ! defined(NOT_A_RNTI)
#define NOT_A_RNTI (rnti_t)0 #define NOT_A_RNTI (rnti_t)0
#endif #endif
#if ! defined(M_RNTI) #if ! defined(M_RNTI)
#define M_RNTI (rnti_t)0xFFFD #define M_RNTI (rnti_t)0xFFFD
#endif #endif
#if ! defined(P_RNTI) #if ! defined(P_RNTI)
#define P_RNTI (rnti_t)0xFFFE #define P_RNTI (rnti_t)0xFFFE
#endif #endif
#if ! defined(SI_RNTI) #if ! defined(SI_RNTI)
#define SI_RNTI (rnti_t)0xFFFF #define SI_RNTI (rnti_t)0xFFFF
#endif #endif
typedef enum config_action_e { typedef enum config_action_e {
CONFIG_ACTION_NULL = 0, CONFIG_ACTION_NULL = 0,
...@@ -219,7 +219,7 @@ typedef uint8_t ebi_t; // eps bearer id ...@@ -219,7 +219,7 @@ typedef uint8_t ebi_t; // eps bearer id
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// may be ITTI not enabled, but type instance is useful also for OTG, // may be ITTI not enabled, but type instance is useful also for OTG,
#if !defined(instance_t) #if !defined(instance_t)
typedef uint16_t instance_t; typedef uint16_t instance_t;
#endif #endif
typedef struct protocol_ctxt_s { typedef struct protocol_ctxt_s {
module_id_t module_id; /*!< \brief Virtualized module identifier */ module_id_t module_id; /*!< \brief Virtualized module identifier */
...@@ -287,5 +287,5 @@ typedef struct protocol_ctxt_s { ...@@ -287,5 +287,5 @@ typedef struct protocol_ctxt_s {
#define CHECK_CTXT_ARGS(CTXT_Pp) #define CHECK_CTXT_ARGS(CTXT_Pp)
#define exit_fun(msg) exit_function(__FILE__,__FUNCTION__,__LINE__,msg) #define exit_fun(msg) exit_function(__FILE__,__FUNCTION__,__LINE__,msg)
void exit_function(const char* file, const char* function, const int line, const char* s); void exit_function(const char *file, const char *function, const int line, const char *s);
#endif #endif
This diff is collapsed.
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. except in compliance with the License.
* You may obtain a copy of the License at You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698 http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and See the License for the specific language governing permissions and
* limitations under the License. limitations under the License.
*------------------------------------------------------------------------------- -------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance: For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org contact@openairinterface.org
*/ */
/* /*
enb_config.h enb_config.h
...@@ -41,10 +41,10 @@ ...@@ -41,10 +41,10 @@
#include "PHY/defs_eNB.h" #include "PHY/defs_eNB.h"
#include "s1ap_messages_types.h" #include "s1ap_messages_types.h"
#ifdef CMAKER #ifdef CMAKER
#include "SystemInformationBlockType2.h" #include "SystemInformationBlockType2.h"
#include "rrc_messages_types.h" #include "rrc_messages_types.h"
#else #else
#include "RRC/LTE/MESSAGES/SystemInformationBlockType2.h" #include "RRC/LTE/MESSAGES/SystemInformationBlockType2.h"
#endif #endif
#include "RRC/LTE/rrc_defs.h" #include "RRC/LTE/rrc_defs.h"
#include <intertask_interface.h> #include <intertask_interface.h>
...@@ -59,9 +59,9 @@ ...@@ -59,9 +59,9 @@
} while (0); } while (0);
/** @defgroup _enb_app ENB APP /** @defgroup _enb_app ENB APP
* @ingroup _oai2 @ingroup _oai2
* @{ @{
*/ */
// Hard to find a defined value for max enb... // Hard to find a defined value for max enb...
#define MAX_ENB 16 #define MAX_ENB 16
......
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. except in compliance with the License.
* You may obtain a copy of the License at You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698 http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and See the License for the specific language governing permissions and
* limitations under the License. limitations under the License.
*------------------------------------------------------------------------------- -------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance: For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org contact@openairinterface.org
*/ */
/*! \file flexran_agent_common.h /*! \file flexran_agent_common.h
* \brief common message primitves and utilities \brief common message primitves and utilities
* \author Xenofon Foukas, Mohamed Kassem and Navid Nikaein and shahab SHARIAT BAGHERI \author Xenofon Foukas, Mohamed Kassem and Navid Nikaein and shahab SHARIAT BAGHERI
* \date 2017 \date 2017
* \version 0.1 \version 0.1
*/ */
...@@ -73,8 +73,8 @@ typedef struct { ...@@ -73,8 +73,8 @@ typedef struct {
stats_updates_context_t stats_context[NUM_MAX_ENB]; stats_updates_context_t stats_context[NUM_MAX_ENB];
/********************************** /**********************************
* FlexRAN protocol messages helper FlexRAN protocol messages helper
* functions and generic handlers functions and generic handlers
**********************************/ **********************************/
/* Helper functions for message (de)serialization */ /* Helper functions for message (de)serialization */
...@@ -83,8 +83,8 @@ int flexran_agent_deserialize_message(void *data, int size, Protocol__FlexranMes ...@@ -83,8 +83,8 @@ int flexran_agent_deserialize_message(void *data, int size, Protocol__FlexranMes
/* Serialize message and then destroy the input flexran msg. Should be called when protocol /* Serialize message and then destroy the input flexran msg. Should be called when protocol
message is created dynamically */ message is created dynamically */
void * flexran_agent_pack_message(Protocol__FlexranMessage *msg, void *flexran_agent_pack_message(Protocol__FlexranMessage *msg,
int * size); int *size);
/* Calls destructor of the given message */ /* Calls destructor of the given message */
err_code_t flexran_agent_destroy_flexran_message(Protocol__FlexranMessage *msg); err_code_t flexran_agent_destroy_flexran_message(Protocol__FlexranMessage *msg);
...@@ -117,7 +117,7 @@ int flexran_agent_lc_config_reply(mid_t mod_id, const void *params, Protocol__Fl ...@@ -117,7 +117,7 @@ int flexran_agent_lc_config_reply(mid_t mod_id, const void *params, Protocol__Fl
int flexran_agent_destroy_lc_config_reply(Protocol__FlexranMessage *msg); int flexran_agent_destroy_lc_config_reply(Protocol__FlexranMessage *msg);
/* eNodeB configuration request message constructor and destructor */ /* eNodeB configuration request message constructor and destructor */
int flexran_agent_enb_config_request(mid_t mod_id, const void* params, Protocol__FlexranMessage **msg); int flexran_agent_enb_config_request(mid_t mod_id, const void *params, Protocol__FlexranMessage **msg);
int flexran_agent_destroy_enb_config_request(Protocol__FlexranMessage *msg); int flexran_agent_destroy_enb_config_request(Protocol__FlexranMessage *msg);
/* UE configuration request message constructor */ /* UE configuration request message constructor */
...@@ -142,7 +142,7 @@ int flexran_agent_destroy_rrc_measurement(Protocol__FlexranMessage *msg); ...@@ -142,7 +142,7 @@ int flexran_agent_destroy_rrc_measurement(Protocol__FlexranMessage *msg);
/* FlexRAN protocol message dispatcher function */ /* FlexRAN protocol message dispatcher function */
Protocol__FlexranMessage* flexran_agent_handle_message (mid_t mod_id, Protocol__FlexranMessage *flexran_agent_handle_message (mid_t mod_id,
uint8_t *data, uint8_t *data,
uint32_t size); uint32_t size);
......
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. except in compliance with the License.
* You may obtain a copy of the License at You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698 http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and See the License for the specific language governing permissions and
* limitations under the License. limitations under the License.
*------------------------------------------------------------------------------- -------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance: For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org contact@openairinterface.org
*/ */
/*! \file flexran_agent_timer.h /*! \file flexran_agent_timer.h
* \brief FlexRAN Timer header \brief FlexRAN Timer header
* \author shahab SHARIAT BAGHERI \author shahab SHARIAT BAGHERI
* \date 2017 \date 2017
* \version 0.1 \version 0.1
*/ */
#include <stdio.h> #include <stdio.h>
#include <time.h> #include <time.h>
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
/******************* /*******************
* timer primitves timer primitves
*******************/ *******************/
#define TIMER_NULL -1 #define TIMER_NULL -1
...@@ -52,16 +52,16 @@ ...@@ -52,16 +52,16 @@
/* Type of the callback executed when the timer expired */ /* Type of the callback executed when the timer expired */
typedef Protocol__FlexranMessage *(*flexran_agent_timer_callback_t)(void*); typedef Protocol__FlexranMessage *(*flexran_agent_timer_callback_t)(void *);
typedef struct flexran_agent_timer_args_s{ typedef struct flexran_agent_timer_args_s {
mid_t mod_id; mid_t mod_id;
Protocol__FlexranMessage *msg; Protocol__FlexranMessage *msg;
} flexran_agent_timer_args_t; } flexran_agent_timer_args_t;
typedef struct flexran_agent_timer_element_s{ typedef struct flexran_agent_timer_element_s {
RB_ENTRY(flexran_agent_timer_element_s) entry; RB_ENTRY(flexran_agent_timer_element_s) entry;
agent_id_t agent_id; agent_id_t agent_id;
...@@ -82,9 +82,9 @@ typedef struct flexran_agent_timer_element_s{ ...@@ -82,9 +82,9 @@ typedef struct flexran_agent_timer_element_s{
} flexran_agent_timer_element_t; } flexran_agent_timer_element_t;
typedef struct flexran_agent_timer_instance_s{ typedef struct flexran_agent_timer_instance_s {
RB_HEAD(flexran_agent_map, flexran_agent_timer_element_s) flexran_agent_head; RB_HEAD(flexran_agent_map, flexran_agent_timer_element_s) flexran_agent_head;
}flexran_agent_timer_instance_t; } flexran_agent_timer_instance_t;
err_code_t flexran_agent_init_timer(void); err_code_t flexran_agent_init_timer(void);
...@@ -98,7 +98,7 @@ err_code_t flexran_agent_create_timer(uint32_t interval_sec, ...@@ -98,7 +98,7 @@ err_code_t flexran_agent_create_timer(uint32_t interval_sec,
uint32_t timer_type, uint32_t timer_type,
xid_t xid, xid_t xid,
flexran_agent_timer_callback_t cb, flexran_agent_timer_callback_t cb,
void* timer_args, void *timer_args,
long *timer_id); long *timer_id);
/* Destroy all existing timers */ /* Destroy all existing timers */
...@@ -117,10 +117,10 @@ err_code_t flexran_agent_stop_timer(long timer_id); ...@@ -117,10 +117,10 @@ err_code_t flexran_agent_stop_timer(long timer_id);
err_code_t flexran_agent_restart_timer(long *timer_id); err_code_t flexran_agent_restart_timer(long *timer_id);
/* Find the timer with the given timer_id */ /* Find the timer with the given timer_id */
struct flexran_agent_timer_element_s * get_timer_entry(long timer_id); struct flexran_agent_timer_element_s *get_timer_entry(long timer_id);
/* Obtain the protocol message stored in the given expired timer */ /* Obtain the protocol message stored in the given expired timer */
Protocol__FlexranMessage * flexran_agent_process_timeout(long timer_id, void* timer_args); Protocol__FlexranMessage *flexran_agent_process_timeout(long timer_id, void *timer_args);
/* Comparator function comparing two timers. Decides the ordering of the timers */ /* Comparator function comparing two timers. Decides the ordering of the timers */
int flexran_agent_compare_timer(struct flexran_agent_timer_element_s *a, struct flexran_agent_timer_element_s *b); int flexran_agent_compare_timer(struct flexran_agent_timer_element_s *a, struct flexran_agent_timer_element_s *b);
......
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. except in compliance with the License.
* You may obtain a copy of the License at You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698 http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and See the License for the specific language governing permissions and
* limitations under the License. limitations under the License.
*------------------------------------------------------------------------------- -------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance: For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org contact@openairinterface.org
*/ */
/*************************************************************************** /***************************************************************************
mem_block.h - description mem_block.h - description
...@@ -51,15 +51,15 @@ typedef struct mem_block_t { ...@@ -51,15 +51,15 @@ typedef struct mem_block_t {
void *pool_buffer_init (void); void *pool_buffer_init (void);
void *pool_buffer_clean (void *arg); void *pool_buffer_clean (void *arg);
void free_mem_block (mem_block_t * leP, const char* caller); void free_mem_block (mem_block_t *leP, const char *caller);
mem_block_t* get_free_mem_block (uint32_t sizeP, const char* caller); mem_block_t *get_free_mem_block (uint32_t sizeP, const char *caller);
mem_block_t *get_free_copy_mem_block (void); mem_block_t *get_free_copy_mem_block (void);
mem_block_t *get_free_copy_mem_block_up (void); mem_block_t *get_free_copy_mem_block_up (void);
mem_block_t *copy_mem_block (mem_block_t * leP, mem_block_t * destP); mem_block_t *copy_mem_block (mem_block_t *leP, mem_block_t *destP);
void display_mem_load (void); void display_mem_load (void);
void check_mem_area (void); void check_mem_area (void);
void check_free_mem_block (mem_block_t * leP); void check_free_mem_block (mem_block_t *leP);
# define MEM_SCALE MAX_MOBILES_PER_ENB # define MEM_SCALE MAX_MOBILES_PER_ENB
// definition of the size of the allocated memory area // definition of the size of the allocated memory area
# define MEM_MNGT_MB0_BLOCK_SIZE 64 # define MEM_MNGT_MB0_BLOCK_SIZE 64
......
This diff is collapsed.
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. except in compliance with the License.
* You may obtain a copy of the License at You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698 http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and See the License for the specific language governing permissions and
* limitations under the License. limitations under the License.
*------------------------------------------------------------------------------- -------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance: For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org contact@openairinterface.org
*/ */
/*! \file gtpv1u_eNB_task.h /*! \file gtpv1u_eNB_task.h
* \brief \brief
* \author Lionel Gauthier \author Lionel Gauthier
* \company Eurecom \company Eurecom
* \email: lionel.gauthier@eurecom.fr \email: lionel.gauthier@eurecom.fr
*/ */
#ifndef GTPV1U_ENB_TASK_H_ #ifndef GTPV1U_ENB_TASK_H_
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
/* /*
int int
gtpv1u_new_data_req( gtpv1u_new_data_req(
uint8_t enb_id, uint8_t enb_id,
uint8_t ue_id, uint8_t ue_id,
uint8_t rab_id, uint8_t rab_id,
...@@ -45,12 +45,12 @@ void *gtpv1u_eNB_task(void *args); ...@@ -45,12 +45,12 @@ void *gtpv1u_eNB_task(void *args);
int int
gtpv1u_create_s1u_tunnel( gtpv1u_create_s1u_tunnel(
const instance_t instanceP, const instance_t instanceP,
const gtpv1u_enb_create_tunnel_req_t * const create_tunnel_req_pP, const gtpv1u_enb_create_tunnel_req_t *const create_tunnel_req_pP,
gtpv1u_enb_create_tunnel_resp_t * const create_tunnel_resp_pP); gtpv1u_enb_create_tunnel_resp_t *const create_tunnel_resp_pP);
int int
gtpv1u_update_s1u_tunnel( gtpv1u_update_s1u_tunnel(
const instance_t instanceP, const instance_t instanceP,
const gtpv1u_enb_create_tunnel_req_t * const create_tunnel_req_pP, const gtpv1u_enb_create_tunnel_req_t *const create_tunnel_req_pP,
const rnti_t prior_rnti); const rnti_t prior_rnti);
#endif /* GTPV1U_ENB_TASK_H_ */ #endif /* GTPV1U_ENB_TASK_H_ */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. except in compliance with the License.
* You may obtain a copy of the License at You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698 http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and See the License for the specific language governing permissions and
* limitations under the License. limitations under the License.
*------------------------------------------------------------------------------- -------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance: For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org contact@openairinterface.org
*/ */
#include <stdio.h> #include <stdio.h>
#include <stdint.h> #include <stdint.h>
...@@ -41,8 +41,7 @@ ...@@ -41,8 +41,7 @@
#include "sgw_lite_defs.h" #include "sgw_lite_defs.h"
#include "ipv4_defs.h" #include "ipv4_defs.h"
int main(int argc, char *argv[]) int main(int argc, char *argv[]) {
{
int i = 0; int i = 0;
int prio = 0; int prio = 0;
mme_config_t mme_config; mme_config_t mme_config;
...@@ -50,7 +49,6 @@ int main(int argc, char *argv[]) ...@@ -50,7 +49,6 @@ int main(int argc, char *argv[])
struct sched_param param = { struct sched_param param = {
.sched_priority = 10, .sched_priority = 10,
}; };
config_parse_opt_line(argc, argv, &mme_config); config_parse_opt_line(argc, argv, &mme_config);
fprintf(stdout, "Starting %s ITTI test\n", PACKAGE_STRING); fprintf(stdout, "Starting %s ITTI test\n", PACKAGE_STRING);
...@@ -74,9 +72,7 @@ int main(int argc, char *argv[]) ...@@ -74,9 +72,7 @@ int main(int argc, char *argv[])
s1ap_mme_init(&mme_config); s1ap_mme_init(&mme_config);
gtpv1u_init(&mme_config); gtpv1u_init(&mme_config);
ipv4_init(&mme_config); ipv4_init(&mme_config);
sgw_lite_init(&mme_config); sgw_lite_init(&mme_config);
message_p = itti_alloc_new_message(TASK_S1AP, MESSAGE_TEST); message_p = itti_alloc_new_message(TASK_S1AP, MESSAGE_TEST);
while(i < (1 << 15)) { while(i < (1 << 15)) {
...@@ -88,6 +84,5 @@ int main(int argc, char *argv[]) ...@@ -88,6 +84,5 @@ int main(int argc, char *argv[])
} }
fprintf(stderr, "Successfully sent %lu messages", get_current_message_number()); fprintf(stderr, "Successfully sent %lu messages", get_current_message_number());
return 0; return 0;
} }
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment