Neverending ODC
Network Protocol Specifications 1.0.0
Martin von Prondzinski
Abstract:
This document specifies the network protocol that is used to communicate in the
Neverending ODC network.
Table of Contents
1 General
The communication between Administration Server, Connection Server, Physics Server
and the Client is divided into three different protocols.
-
Login Protocol: The Login Protocol is used to login and logout the
Client at the Administration Server. It also provides the possibility to
synchronize the time between the client and the Connection Server.
- Action Protocol: The Action Protocol is used to send and receive Actions
and Entities on Server and Client.
- Statistic Protocol: The Statistic Protocol provides the functionality
to fetch Statistics from the Servers.
All sended package have the same interpretation of the first 3 bytes.
0 |
1 |
2 |
3 - oo |
Length |
Protocol |
Protocol |
High byte |
Low byte |
code |
specific |
The length information is the number of the bytes which will follow byte 1. This
provides the possibility to receive at first only two bytes and then know how
long the package is.
2 Login Protocol - 0x00
The Login Protocol has the Protocol code 0x00. The specific header for the
Login Protocol is:
0 |
1 |
2 |
3 |
4 - oo |
Length |
|
Function |
Function |
High byte |
Low byte |
0x00 |
code |
specific |
The following functions are possible:
2.1 Login Request - 0x00
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
Length |
|
|
UID |
High byte |
Low byte |
0x00 |
0x00 |
High byte |
Middle High byte |
Middle
Low byte |
Low byte |
8 - oo |
|
|
|
|
|
|
Name |
0x00 |
Nickname |
0x00 |
Password |
0x00 |
2.2 Login Response - 0x01
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
Length |
|
|
UID |
High byte |
Low byte |
0x00 |
0x01 |
High byte |
Middle High byte |
Middle
Low byte |
Low byte |
after this comes a 2 byte code which represents the login status.
-
Login successful - 0x00xx:
8 |
9 |
10 |
11 - oo |
|
Login |
|
|
|
Portnumber |
|
0x00 |
trys |
0x00 |
Hostname |
0x00 |
High byte |
Low byte |
0x00 |
- No such User found - 0x0100:
- Password was wrong - 0x0200:
- wrong UID for the user - 0x0300:
2.3 Logout Request - 0x02
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
Length |
|
|
UID |
High byte |
Low byte |
0x00 |
0x02 |
High byte |
Middle High byte |
Middle
Low byte |
Low byte |
2.4 Logout Response - 0x03
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
Length |
|
|
UID |
High byte |
Low byte |
0x00 |
0x03 |
High byte |
Middle High byte |
Middle
Low byte |
Low byte |
Code can have the following values:
-
0x00 - The Logout was successful
- 0x01 - The Client was already logged out
- 0x02 - The transfered Password was wrong
2.5 Time Request - 0x04
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
Length |
|
|
Local Time |
|
High byte |
Low byte |
0x00 |
0x04 |
High byte |
Middle High byte |
Middle
Low byte |
Low byte |
0x00 |
2.6 Time Response - 0x05
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
Length |
|
|
Local Time |
|
High byte |
Low byte |
0x00 |
0x05 |
High byte |
Middle High byte |
Middle
Low byte |
Low byte |
0x00 |
9 |
10 |
11 |
12 |
13 |
Server Time |
|
High byte |
Middle High byte |
Middle Low byte |
Low byte |
0x00 |
2.7 Account Request - 0x06
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
Length |
|
|
UID |
High byte |
Low byte |
0x00 |
0x06 |
0x00 |
0x00 |
0x00 |
0x00 |
8 - oo |
|
|
|
|
|
|
Name |
0x00 |
Nickname |
0x00 |
Password |
0x00 |
2.8 Account Response - 0x07
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
Length |
|
|
UID |
High byte |
Low byte |
0x00 |
0x07 |
High byte |
Middle High byte |
Middle Low byte |
Low byte |
after this comes a 2 byte code which represents the login status.
-
Account successfully created - 0x00:
The Account was created succesfully and the UID is given back
- No free UID - 0x01:
The Account was not created because of less UID number
- Internal Error - 0x02:
The Account was not created because of an internal error
3 Action Protocol - 0xF0
The Action Protocol has the Protocol code 0xF0. The specific header for the
Action Protocol is:
0 |
1 |
2 |
3 |
4 |
5 |
6 |
Length |
|
UID |
High byte |
Low byte |
0xF0 |
Hi-byte |
Mid-High |
Mid-Low |
Lo-byte |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
Action type |
Action sub-type |
Time stamp |
High byte |
Low byte |
High byte |
Low byte |
Hi-byte |
Mid-High |
Mid-Low |
Lo-byte |
15 |
16 |
17 |
18 |
19 - oo |
Entity ID |
Function |
High-byte |
Mid-High-byte |
Mid-Low-byte |
Low-byte |
specific |
4 Statistic Protocol - 0x0F
Not implemented yet :-(