3MICTCP/include/api/mictcp_core.h
Guillaume Averlant e28e634800 Updated the mictcp base with the 2017-03-18 source code distributed to students.
These changes were not made by myself.
2018-05-01 18:20:58 +02:00

40 lines
1.2 KiB
C

#ifndef MICTCP_CORE_H
#define MICTCP_CORE_H
#include <mictcp.h>
#include <math.h>
/**************************************************************
* Public core functions, can be used for implementing mictcp *
**************************************************************/
int initialize_components(start_mode sm);
int IP_send(mic_tcp_pdu, mic_tcp_sock_addr);
int IP_recv(ip_payload*, mic_tcp_sock_addr*, unsigned long timeout);
int app_buffer_get(mic_tcp_payload);
void app_buffer_put(mic_tcp_payload);
void set_loss_rate(unsigned short);
unsigned long get_now_time_msec();
unsigned long get_now_time_usec();
/**********************************************************************
* Private core functions, should not be used for implementing mictcp *
**********************************************************************/
#define API_CS_Port 8524
#define API_SC_Port 8525
#define API_HD_Size 15
int mic_tcp_core_send(mic_tcp_payload);
mic_tcp_payload get_full_stream(mic_tcp_pdu);
mic_tcp_payload get_mic_tcp_data(ip_payload);
mic_tcp_header get_mic_tcp_header(ip_payload);
void* listening(void*);
void print_header(mic_tcp_pdu);
int min_size(int, int);
float mod(int, float);
#endif