Files
openairinterface5g/openair2/UTIL/OTG/otg_tx_socket.h
Robert Schmidt 8107939f08 Change OAI license to CSSL v1.0 (and others)
- all RAN code, CI code, configuration files, dockerfiles, in CSSL v1.0
- all deployment code (openshift, charts, ancillary files like shell
  scripts), in MIT
- documentation in CC-BY-4.0
- exceptions might apply and are listed in NOTICE
- there is a new LICENSES folder with all licenses
- CONTRIBUTIONS.md has been updated accordingly

For automated changes based on OAI PL v1.1:

    perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.{c,h,cpp}
    perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.ts
    perl -i~ -0pe 's/<!--.*Licensed to the OpenAirInterface.*openairinterface.org\n.*-->/<!-- SPDX-License-Identifier: LicenseRef-CSSL-1.0 -->/s' **/*.xml

The rest (cmake, files with missing license, cmake) manually.
2026-03-27 16:36:37 +01:00

99 lines
2.3 KiB
C

/*
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
*/
/*!
* \brief brief explain how this block is organized, and how it works: OTG TX traffic generation functions with sockets
*/
#ifndef __OTG_TX_SOCKET_H__
#define __OTG_TX_SOCKET_H__
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include "otg.h"
#include "otg_tx.h"
//-----------------------begin func proto-------------------
/*! \fn socket_packet_send(int, int , int)
* \brief this function allow to run the client, with the appropriate parameters.
* \param[in] src, dst and the state
* \param[out] void
* \return void
* \note
* @ingroup _otg
*/
void socket_packet_send(int src, int dst, int state,int ctime);
/*! \fn client_socket_tcp_ip4(int, int , int)
* \brief this function allow to run the client, with IPv4 and TCP protocol.
* \param[in] src, dst and the state
* \param[out] void
* \return void
* \note
* @ingroup _otg
*/
void client_socket_tcp_ip4(int src, int dst, int state,int ctime);
/*! \fn client_socket_tcp_ip6(int, int , int)
* \brief this function allow to run the client, with IPv6 and TCP protocol.
* \param[in] src, dst and the state
* \param[out] void
* \return void
* \note
* @ingroup _otg
*/
void client_socket_tcp_ip6(int src, int dst, int state,int ctime);
/*! \fn client_socket_udp_ip4(int, int , int)
* \brief this function allow to run the client, with IPv4 and UDP protocol.
* \param[in] src, dst and the state
* \param[out] void
* \return void
* \note
* @ingroup _otg
*/
void client_socket_udp_ip4(int src, int dst, int state,int ctime);
/*! \fn client_socket_udp_ip6(int, int , int)
* \brief this function allow to run the client, with IPv6 and UDP protocol.
* \param[in] src, dst and the state
* \param[out] void
* \return void
* \note
* @ingroup _otg
*/
void client_socket_udp_ip6(int src, int dst, int state,int ctime);
/*! \fn int packet_gen(int src, int dst, int state, int ctime)
* \brief return char * pointer over the payload, else NULL
* \param[in] source,
* \param[out] packet_t: the generated packet: otg_header + header + payload
* \note
* @ingroup _otg
*/
char* packet_gen_socket(int src, int dst, int state, int ctime);
control_hdr_t *otg_info_hdr_gen(int src, int dst, int trans_proto, int ip_v);
void init_control_header();
//-----------------------end func proto-------------------
#endif