Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
networkprotocol.h File Reference
#include "irrTypes.h"
+ Include dependency graph for networkprotocol.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TEXTURENAME_ALLOWED_CHARS   "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_.-"
 

Typedefs

typedef u16 session_t
 

Enumerations

enum  ToClientCommand : u16 {
  TOCLIENT_HELLO = 0x02 , TOCLIENT_AUTH_ACCEPT = 0x03 , TOCLIENT_ACCEPT_SUDO_MODE = 0x04 , TOCLIENT_DENY_SUDO_MODE = 0x05 ,
  TOCLIENT_ACCESS_DENIED = 0x0A , TOCLIENT_BLOCKDATA = 0x20 , TOCLIENT_ADDNODE = 0x21 , TOCLIENT_REMOVENODE = 0x22 ,
  TOCLIENT_INVENTORY = 0x27 , TOCLIENT_TIME_OF_DAY = 0x29 , TOCLIENT_CSM_RESTRICTION_FLAGS = 0x2A , TOCLIENT_PLAYER_SPEED = 0x2B ,
  TOCLIENT_MEDIA_PUSH = 0x2C , TOCLIENT_CHAT_MESSAGE = 0x2F , TOCLIENT_ACTIVE_OBJECT_REMOVE_ADD = 0x31 , TOCLIENT_ACTIVE_OBJECT_MESSAGES = 0x32 ,
  TOCLIENT_HP = 0x33 , TOCLIENT_MOVE_PLAYER = 0x34 , TOCLIENT_ACCESS_DENIED_LEGACY = 0x35 , TOCLIENT_FOV = 0x36 ,
  TOCLIENT_DEATHSCREEN_LEGACY = 0x37 , TOCLIENT_MEDIA = 0x38 , TOCLIENT_NODEDEF = 0x3a , TOCLIENT_ANNOUNCE_MEDIA = 0x3c ,
  TOCLIENT_ITEMDEF = 0x3d , TOCLIENT_PLAY_SOUND = 0x3f , TOCLIENT_STOP_SOUND = 0x40 , TOCLIENT_PRIVILEGES = 0x41 ,
  TOCLIENT_INVENTORY_FORMSPEC = 0x42 , TOCLIENT_DETACHED_INVENTORY = 0x43 , TOCLIENT_SHOW_FORMSPEC = 0x44 , TOCLIENT_MOVEMENT = 0x45 ,
  TOCLIENT_SPAWN_PARTICLE = 0x46 , TOCLIENT_ADD_PARTICLESPAWNER = 0x47 , TOCLIENT_HUDADD = 0x49 , TOCLIENT_HUDRM = 0x4a ,
  TOCLIENT_HUDCHANGE = 0x4b , TOCLIENT_HUD_SET_FLAGS = 0x4c , TOCLIENT_HUD_SET_PARAM = 0x4d , TOCLIENT_BREATH = 0x4e ,
  TOCLIENT_SET_SKY = 0x4f , TOCLIENT_OVERRIDE_DAY_NIGHT_RATIO = 0x50 , TOCLIENT_LOCAL_PLAYER_ANIMATIONS = 0x51 , TOCLIENT_EYE_OFFSET = 0x52 ,
  TOCLIENT_DELETE_PARTICLESPAWNER = 0x53 , TOCLIENT_CLOUD_PARAMS = 0x54 , TOCLIENT_FADE_SOUND = 0x55 , TOCLIENT_UPDATE_PLAYER_LIST = 0x56 ,
  TOCLIENT_MODCHANNEL_MSG = 0x57 , TOCLIENT_MODCHANNEL_SIGNAL = 0x58 , TOCLIENT_NODEMETA_CHANGED = 0x59 , TOCLIENT_SET_SUN = 0x5a ,
  TOCLIENT_SET_MOON = 0x5b , TOCLIENT_SET_STARS = 0x5c , TOCLIENT_MOVE_PLAYER_REL = 0x5d , TOCLIENT_SRP_BYTES_S_B = 0x60 ,
  TOCLIENT_FORMSPEC_PREPEND = 0x61 , TOCLIENT_MINIMAP_MODES = 0x62 , TOCLIENT_SET_LIGHTING = 0x63 , TOCLIENT_NUM_MSG_TYPES = 0x64
}
 
enum  ToServerCommand : u16 {
  TOSERVER_INIT = 0x02 , TOSERVER_INIT2 = 0x11 , TOSERVER_MODCHANNEL_JOIN = 0x17 , TOSERVER_MODCHANNEL_LEAVE = 0x18 ,
  TOSERVER_MODCHANNEL_MSG = 0x19 , TOSERVER_PLAYERPOS = 0x23 , TOSERVER_GOTBLOCKS = 0x24 , TOSERVER_DELETEDBLOCKS = 0x25 ,
  TOSERVER_INVENTORY_ACTION = 0x31 , TOSERVER_CHAT_MESSAGE = 0x32 , TOSERVER_DAMAGE = 0x35 , TOSERVER_PLAYERITEM = 0x37 ,
  TOSERVER_RESPAWN_LEGACY = 0x38 , TOSERVER_INTERACT = 0x39 , TOSERVER_REMOVED_SOUNDS = 0x3a , TOSERVER_NODEMETA_FIELDS = 0x3b ,
  TOSERVER_INVENTORY_FIELDS = 0x3c , TOSERVER_REQUEST_MEDIA = 0x40 , TOSERVER_HAVE_MEDIA = 0x41 , TOSERVER_CLIENT_READY = 0x43 ,
  TOSERVER_FIRST_SRP = 0x50 , TOSERVER_SRP_BYTES_A = 0x51 , TOSERVER_SRP_BYTES_M = 0x52 , TOSERVER_UPDATE_CLIENT_INFO = 0x53 ,
  TOSERVER_NUM_MSG_TYPES = 0x54
}
 
enum  AuthMechanism { AUTH_MECHANISM_NONE = 0 , AUTH_MECHANISM_LEGACY_PASSWORD = 1 << 0 , AUTH_MECHANISM_SRP = 1 << 1 , AUTH_MECHANISM_FIRST_SRP = 1 << 2 }
 
enum  AccessDeniedCode : u8 {
  SERVER_ACCESSDENIED_WRONG_PASSWORD , SERVER_ACCESSDENIED_UNEXPECTED_DATA , SERVER_ACCESSDENIED_SINGLEPLAYER , SERVER_ACCESSDENIED_WRONG_VERSION ,
  SERVER_ACCESSDENIED_WRONG_CHARS_IN_NAME , SERVER_ACCESSDENIED_WRONG_NAME , SERVER_ACCESSDENIED_TOO_MANY_USERS , SERVER_ACCESSDENIED_EMPTY_PASSWORD ,
  SERVER_ACCESSDENIED_ALREADY_CONNECTED , SERVER_ACCESSDENIED_SERVER_FAIL , SERVER_ACCESSDENIED_CUSTOM_STRING , SERVER_ACCESSDENIED_SHUTDOWN ,
  SERVER_ACCESSDENIED_CRASH , SERVER_ACCESSDENIED_MAX
}
 
enum  PlayerListModifer : u8 { PLAYER_LIST_INIT , PLAYER_LIST_ADD , PLAYER_LIST_REMOVE }
 
enum  CSMRestrictionFlags : u64 {
  CSM_RF_NONE = 0x00000000 , CSM_RF_LOAD_CLIENT_MODS = 0x00000001 , CSM_RF_CHAT_MESSAGES = 0x00000002 , CSM_RF_READ_ITEMDEFS = 0x00000004 ,
  CSM_RF_READ_NODEDEFS = 0x00000008 , CSM_RF_LOOKUP_NODES = 0x00000010 , CSM_RF_READ_PLAYERINFO = 0x00000020 , CSM_RF_ALL = 0xFFFFFFFF
}
 
enum  InteractAction : u8 {
  INTERACT_START_DIGGING , INTERACT_STOP_DIGGING , INTERACT_DIGGING_COMPLETED , INTERACT_PLACE ,
  INTERACT_USE , INTERACT_ACTIVATE
}
 

Variables

const u16 LATEST_PROTOCOL_VERSION
 
constexpr u16 SERVER_PROTOCOL_VERSION_MIN = 37
 
constexpr u16 CLIENT_PROTOCOL_VERSION_MIN = 37
 
const u16 FORMSPEC_API_VERSION
 

Macro Definition Documentation

◆ TEXTURENAME_ALLOWED_CHARS

#define TEXTURENAME_ALLOWED_CHARS   "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_.-"

Typedef Documentation

◆ session_t

typedef u16 session_t

Enumeration Type Documentation

◆ AccessDeniedCode

enum AccessDeniedCode : u8
Enumerator
SERVER_ACCESSDENIED_WRONG_PASSWORD 
SERVER_ACCESSDENIED_UNEXPECTED_DATA 
SERVER_ACCESSDENIED_SINGLEPLAYER 
SERVER_ACCESSDENIED_WRONG_VERSION 
SERVER_ACCESSDENIED_WRONG_CHARS_IN_NAME 
SERVER_ACCESSDENIED_WRONG_NAME 
SERVER_ACCESSDENIED_TOO_MANY_USERS 
SERVER_ACCESSDENIED_EMPTY_PASSWORD 
SERVER_ACCESSDENIED_ALREADY_CONNECTED 
SERVER_ACCESSDENIED_SERVER_FAIL 
SERVER_ACCESSDENIED_CUSTOM_STRING 
SERVER_ACCESSDENIED_SHUTDOWN 
SERVER_ACCESSDENIED_CRASH 
SERVER_ACCESSDENIED_MAX 

◆ AuthMechanism

Enumerator
AUTH_MECHANISM_NONE 
AUTH_MECHANISM_LEGACY_PASSWORD 
AUTH_MECHANISM_SRP 
AUTH_MECHANISM_FIRST_SRP 

◆ CSMRestrictionFlags

enum CSMRestrictionFlags : u64
Enumerator
CSM_RF_NONE 
CSM_RF_LOAD_CLIENT_MODS 
CSM_RF_CHAT_MESSAGES 
CSM_RF_READ_ITEMDEFS 
CSM_RF_READ_NODEDEFS 
CSM_RF_LOOKUP_NODES 
CSM_RF_READ_PLAYERINFO 
CSM_RF_ALL 

◆ InteractAction

enum InteractAction : u8
Enumerator
INTERACT_START_DIGGING 
INTERACT_STOP_DIGGING 
INTERACT_DIGGING_COMPLETED 
INTERACT_PLACE 
INTERACT_USE 
INTERACT_ACTIVATE 

◆ PlayerListModifer

enum PlayerListModifer : u8
Enumerator
PLAYER_LIST_INIT 
PLAYER_LIST_ADD 
PLAYER_LIST_REMOVE 

◆ ToClientCommand

enum ToClientCommand : u16
Enumerator
TOCLIENT_HELLO 
TOCLIENT_AUTH_ACCEPT 
TOCLIENT_ACCEPT_SUDO_MODE 
TOCLIENT_DENY_SUDO_MODE 
TOCLIENT_ACCESS_DENIED 
TOCLIENT_BLOCKDATA 
TOCLIENT_ADDNODE 
TOCLIENT_REMOVENODE 
TOCLIENT_INVENTORY 
TOCLIENT_TIME_OF_DAY 
TOCLIENT_CSM_RESTRICTION_FLAGS 
TOCLIENT_PLAYER_SPEED 
TOCLIENT_MEDIA_PUSH 
TOCLIENT_CHAT_MESSAGE 
TOCLIENT_ACTIVE_OBJECT_REMOVE_ADD 
TOCLIENT_ACTIVE_OBJECT_MESSAGES 
TOCLIENT_HP 
TOCLIENT_MOVE_PLAYER 
TOCLIENT_ACCESS_DENIED_LEGACY 
TOCLIENT_FOV 
TOCLIENT_DEATHSCREEN_LEGACY 
TOCLIENT_MEDIA 
TOCLIENT_NODEDEF 
TOCLIENT_ANNOUNCE_MEDIA 
TOCLIENT_ITEMDEF 
TOCLIENT_PLAY_SOUND 
TOCLIENT_STOP_SOUND 
TOCLIENT_PRIVILEGES 
TOCLIENT_INVENTORY_FORMSPEC 
TOCLIENT_DETACHED_INVENTORY 
TOCLIENT_SHOW_FORMSPEC 
TOCLIENT_MOVEMENT 
TOCLIENT_SPAWN_PARTICLE 
TOCLIENT_ADD_PARTICLESPAWNER 
TOCLIENT_HUDADD 
TOCLIENT_HUDRM 
TOCLIENT_HUDCHANGE 
TOCLIENT_HUD_SET_FLAGS 
TOCLIENT_HUD_SET_PARAM 
TOCLIENT_BREATH 
TOCLIENT_SET_SKY 
TOCLIENT_OVERRIDE_DAY_NIGHT_RATIO 
TOCLIENT_LOCAL_PLAYER_ANIMATIONS 
TOCLIENT_EYE_OFFSET 
TOCLIENT_DELETE_PARTICLESPAWNER 
TOCLIENT_CLOUD_PARAMS 
TOCLIENT_FADE_SOUND 
TOCLIENT_UPDATE_PLAYER_LIST 
TOCLIENT_MODCHANNEL_MSG 
TOCLIENT_MODCHANNEL_SIGNAL 
TOCLIENT_NODEMETA_CHANGED 
TOCLIENT_SET_SUN 
TOCLIENT_SET_MOON 
TOCLIENT_SET_STARS 
TOCLIENT_MOVE_PLAYER_REL 
TOCLIENT_SRP_BYTES_S_B 
TOCLIENT_FORMSPEC_PREPEND 
TOCLIENT_MINIMAP_MODES 
TOCLIENT_SET_LIGHTING 
TOCLIENT_NUM_MSG_TYPES 

◆ ToServerCommand

enum ToServerCommand : u16
Enumerator
TOSERVER_INIT 
TOSERVER_INIT2 
TOSERVER_MODCHANNEL_JOIN 
TOSERVER_MODCHANNEL_LEAVE 
TOSERVER_MODCHANNEL_MSG 
TOSERVER_PLAYERPOS 
TOSERVER_GOTBLOCKS 
TOSERVER_DELETEDBLOCKS 
TOSERVER_INVENTORY_ACTION 
TOSERVER_CHAT_MESSAGE 
TOSERVER_DAMAGE 
TOSERVER_PLAYERITEM 
TOSERVER_RESPAWN_LEGACY 
TOSERVER_INTERACT 
TOSERVER_REMOVED_SOUNDS 
TOSERVER_NODEMETA_FIELDS 
TOSERVER_INVENTORY_FIELDS 
TOSERVER_REQUEST_MEDIA 
TOSERVER_HAVE_MEDIA 
TOSERVER_CLIENT_READY 
TOSERVER_FIRST_SRP 
TOSERVER_SRP_BYTES_A 
TOSERVER_SRP_BYTES_M 
TOSERVER_UPDATE_CLIENT_INFO 
TOSERVER_NUM_MSG_TYPES 

Variable Documentation

◆ CLIENT_PROTOCOL_VERSION_MIN

u16 CLIENT_PROTOCOL_VERSION_MIN = 37
constexpr

◆ FORMSPEC_API_VERSION

◆ LATEST_PROTOCOL_VERSION

◆ SERVER_PROTOCOL_VERSION_MIN

u16 SERVER_PROTOCOL_VERSION_MIN = 37
constexpr