Skip to content

Reverse Engineering #1

@Gadgetoid

Description

@Gadgetoid

I've got the majority of the Airmash protocol figured out- enough to connect to a server, receive and parse data, and pilot a ship. However, I would very much like to build out Enum types for things like "protocol" and other ambiguous attributes in some of the packets.

I'm in the process of adding "TODO" notes into the code where it's unclear to me what a packet, or part of a packet, does, or what its expected ranges and human-readable values might be.

Player Commands (Client -> Server)

Player LOGIN

  • What are the values for protocol?
  • What's the minimum/maximum allowed range for horizonX and horizonY and what effect does it have
  • What are the available flag types/supported two-letter country codes?

player_commands['LOGIN']: Struct(
# Log in a player
# Players can log in anonymously by providing a 'session' value of 'none'
# Protocol: should be 4, TODO: enum is needed to describe the other available protocols
# Name: is the player name, up to 255 chars
# HorizonX: is the game screen width / 2
# HorizonY: is the game screen height / 2
# Flag: the two-letter country code of desired flag
'command' / Default(PlayerCommands, 'LOGIN'),
'protocol' / Int8ub,
'name' / Text,
'session' / Default(Text, 'none'),
'horizonX' / Int16ul,
'horizonY' / Int16ul,
'flag' / Text

Player BACKUP

  • What does this do? Is this an alternate to "LOGIN" that allows us to resume a session with a particular token?

player_commands['BACKUP']: Struct(
# TODO: Figuere out what this is for
'command' / Default(PlayerCommands, 'BACKUP'),
'token' / Text
),

Player ACK

  • Under what circumstances do we need to reply to the server with an ACK? It seems we have PING/PONG for keepalive. Should we ACKnowledge every received packet?

player_commands['ACK']: Struct(
# TODO: Figure out what this is for
# Have managed to maintain a connection to the server without ack-ing any packets
'command' / Default(PlayerCommands, 'ACK')
),

Player COMMAND

  • Can we quantify the com field with all available commands?

player_commands['COMMAND']: Struct(
# Send a command to the server, eg: to switch to spectate mode: com = spectate, data = player ID
# com: command to send
# data: additional data for command
'command' / Default(PlayerCommands, 'COMMAND'),
'com' / Text,
'data' / Text
),

Player LOCALPING

  • What is this for?

player_commands['LOCALPING']: Struct(
# TODO: figure out what this is for
'command' / Default(PlayerCommands, 'LOCALPING'),
'auth' / Int32ul
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions