first commit
[libutp-c.git] / utp_utils.h
bloba7aa385f7546a4defb28f9d41fe7ad2504d96283
1 #ifndef UTP_UTILS_H
2 #define UTP_UTILS_H
3 /* This should return the MTU to the destination */
4 uint16 UTP_GetUDPMTU(struct sockaddr *remote, socklen_t remotelen);
5 /* This should return the number of bytes of UDP overhead for one packet to the
6 destination, for overhead calculation only */
7 uint16 UTP_GetUDPOverhead(struct sockaddr *remote, socklen_t remotelen);
8 /* This should return monotonically increasing milliseconds, start point does not matter */
9 uint32 UTP_GetMilliseconds(void);
10 /* This should return monotonically increasing microseconds, start point does not matter */
11 uint64 UTP_GetMicroseconds(void);
12 /* This should return a random uint32 */
13 uint32 UTP_Random(void);
14 /* This is called every time we have a delay sample is made */
15 void UTP_DelaySample(struct sockaddr *remote, int sample_ms);
16 /* Should return the max packet size to use when sending to the given address */
17 size_t UTP_sockaddr_GetPacketSize(struct sockaddr *remote);
18 #endif