Files
openairinterface5g/openair2/LAYER2/PDCP_v10.1.0/pdcp_util.h
T
Robert Schmidt 0b91791f67 Use (std) bool instead of custom bool types
OAI is riddled with boolean_t, FALSE, TRUE, etc. This makes no sense, as
there is a standard bool type, and could lead to nasty bugs if a
definition of a bool is non-standard (0 == false, true == !false). This
commit removes all non-standard bools in the whole project.
2022-06-27 10:07:48 +02:00

74 lines
2.4 KiB
C

/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* 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
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file pdcp_util.h
* \brief PDCP Util Methods
* \author Baris Demiray
* \date 2011
*/
#ifndef PDCP_UTIL_H
#define PDCP_UTIL_H
#include "common/utils/LOG/log.h"
#include "../../COMMON/platform_types.h"
#include "pdcp.h"
/*
* Prints incoming byte stream in hexadecimal and readable form
*
* @param component Utilised as with macros defined in UTIL/LOG/log.h
* @param data unsigned char* pointer for data buffer
* @param size Number of octets in data buffer
* @return none
*/
void util_print_hex_octets(comp_name_t component, unsigned char* data, unsigned long size);
/*
* Flush incoming byte stream in hexadecimal without formating
*
* @param component Utilised as with macros defined in UTIL/LOG/log.h
* @param data unsigned char* pointer for data buffer
* @param size Number of octets in data buffer
* @return none
*/
void util_flush_hex_octets(comp_name_t component, unsigned char* data, unsigned long size);
/*
* Prints binary representation of given octet prepending
* passed log message
*
* @param Octet as an unsigned character
* @return None
*/
void util_print_binary_representation(unsigned char* message, uint8_t octet);
/*
* Sets the bit of `octet' at index `index'
*
* @param octet Octet
* @param index Index
* @return true on success, false otherwise
*/
bool util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index);
#endif // PDCP_UTIL_H