/* * 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 #include #include #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