Luanti 5.16.0-dev
Loading...
Searching...
No Matches
internal.h File Reference
#include "network/mtp/impl.h"
#include "util/numeric.h"
Include dependency graph for internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ConstSharedPtr< T >
class  con::NotFoundException
class  con::ProcessedSilentlyException
class  con::ProcessedQueued
class  con::IncomingDataCorruption
struct  con::BufferedPacket
struct  con::IncomingSplitPacket
class  con::ReliablePacketBuffer
class  con::IncomingSplitBuffer
struct  con::ConnectionCommand
class  con::Channel
class  con::UDPPeer

Namespaces

namespace  con

Macros

#define PROTOCOL_ID   0x4f457403
#define MAX_UDP_PEERS   65535
#define BASE_HEADER_SIZE   7
#define CHANNEL_COUNT   3
#define ORIGINAL_HEADER_SIZE   1
#define RELIABLE_HEADER_SIZE   3
#define SEQNUM_INITIAL   65500
#define SEQNUM_MAX   65535
#define MAX_RELIABLE_WINDOW_SIZE   0x8000
#define MAX_RELIABLE_WINDOW_SIZE_SEND   2048
#define START_RELIABLE_WINDOW_SIZE   64
#define MIN_RELIABLE_WINDOW_SIZE   32

Enumerations

enum  con::PacketType : u8 {
  con::PACKET_TYPE_CONTROL = 0 , con::PACKET_TYPE_ORIGINAL = 1 , con::PACKET_TYPE_SPLIT = 2 , con::PACKET_TYPE_RELIABLE = 3 ,
  con::PACKET_TYPE_MAX
}
enum  con::ControlType : u8 { con::CONTROLTYPE_ACK = 0 , con::CONTROLTYPE_SET_PEER_ID = 1 , con::CONTROLTYPE_PING = 2 , con::CONTROLTYPE_DISCO = 3 }
enum  con::ConnectionCommandType {
  con::CONNCMD_NONE , con::CONNCMD_SERVE , con::CONNCMD_CONNECT , con::CONNCMD_DISCONNECT ,
  con::CONNCMD_DISCONNECT_PEER , con::CONNCMD_SEND , con::CONNCMD_SEND_TO_ALL , con::CONCMD_ACK ,
  con::CONCMD_CREATE_PEER , con::CONNCMD_RESEND_ONE , con::CONNCMD_PEER_ID_SET
}

Functions

bool con::seqnum_higher (u16 totest, u16 base)
bool con::seqnum_in_window (u16 seqnum, u16 next, u16 window_size)
float con::CALC_DTIME (u64 lasttime, u64 curtime)
BufferedPacketPtr con::makePacket (const Address &address, const SharedBuffer< u8 > &data, u32 protocol_id, session_t sender_peer_id, u8 channel)
void con::makeAutoSplitPacket (const SharedBuffer< u8 > &data, u32 chunksize_max, u16 &split_seqnum, std::list< SharedBuffer< u8 > > *list)
SharedBuffer< u8 > con::makeReliablePacket (const SharedBuffer< u8 > &data, u16 seqnum)

Macro Definition Documentation

◆ BASE_HEADER_SIZE

◆ CHANNEL_COUNT

◆ MAX_RELIABLE_WINDOW_SIZE

◆ MAX_RELIABLE_WINDOW_SIZE_SEND

#define MAX_RELIABLE_WINDOW_SIZE_SEND   2048

◆ MAX_UDP_PEERS

#define MAX_UDP_PEERS   65535

◆ MIN_RELIABLE_WINDOW_SIZE

#define MIN_RELIABLE_WINDOW_SIZE   32

◆ ORIGINAL_HEADER_SIZE

#define ORIGINAL_HEADER_SIZE   1

◆ PROTOCOL_ID

#define PROTOCOL_ID   0x4f457403

◆ RELIABLE_HEADER_SIZE

◆ SEQNUM_INITIAL

#define SEQNUM_INITIAL   65500

◆ SEQNUM_MAX

◆ START_RELIABLE_WINDOW_SIZE

#define START_RELIABLE_WINDOW_SIZE   64

Referenced by con::UDPPeer::UDPPeer().