summaryrefslogtreecommitdiff
path: root/src/proto2
diff options
context:
space:
mode:
Diffstat (limited to 'src/proto2')
-rw-r--r--src/proto2/any-user.hpp111
-rw-r--r--src/proto2/any-user_test.cpp23
-rw-r--r--src/proto2/char-map.hpp31
-rw-r--r--src/proto2/char-map_test.cpp23
-rw-r--r--src/proto2/char-user.hpp31
-rw-r--r--src/proto2/char-user_test.cpp23
-rw-r--r--src/proto2/fwd.hpp26
-rw-r--r--src/proto2/include_cstdint_test.cpp26
-rw-r--r--src/proto2/include_enums_test.cpp23
-rw-r--r--src/proto2/include_human_time_diff_test.cpp23
-rw-r--r--src/proto2/include_ids_test.cpp29
-rw-r--r--src/proto2/include_ip_test.cpp23
-rw-r--r--src/proto2/include_little_test.cpp26
-rw-r--r--src/proto2/include_strs_test.cpp27
-rw-r--r--src/proto2/include_utils_test.cpp25
-rw-r--r--src/proto2/include_version_test.cpp23
-rw-r--r--src/proto2/include_vstring_test.cpp27
-rw-r--r--src/proto2/login-admin.hpp1781
-rw-r--r--src/proto2/login-admin_test.cpp23
-rw-r--r--src/proto2/login-char.hpp941
-rw-r--r--src/proto2/login-char_test.cpp23
-rw-r--r--src/proto2/login-user.hpp31
-rw-r--r--src/proto2/login-user_test.cpp23
-rw-r--r--src/proto2/map-user.hpp81
-rw-r--r--src/proto2/map-user_test.cpp23
-rw-r--r--src/proto2/types.hpp264
26 files changed, 3710 insertions, 0 deletions
diff --git a/src/proto2/any-user.hpp b/src/proto2/any-user.hpp
new file mode 100644
index 0000000..f2847ef
--- /dev/null
+++ b/src/proto2/any-user.hpp
@@ -0,0 +1,111 @@
+#ifndef TMWA_PROTO2_ANY_USER_HPP
+#define TMWA_PROTO2_ANY_USER_HPP
+// any-user.hpp - TMWA network protocol: any/user
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+// This is a generated file, edit tools/protocol.py instead
+
+# include "fwd.hpp"
+
+# include "types.hpp"
+
+// This is a public protocol, and changes require client cooperation
+
+struct RPacket0x7530_Fixed
+{
+ uint16_t packet_id;
+};
+struct NetRPacket0x7530_Fixed
+{
+ Little16 packet_id;
+};
+static_assert(offsetof(NetRPacket0x7530_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7530_Fixed, packet_id) == 0");
+static_assert(sizeof(NetRPacket0x7530_Fixed) == 2, "sizeof(NetRPacket0x7530_Fixed) == 2");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x7530_Fixed *network, RPacket0x7530_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x7530_Fixed *native, NetRPacket0x7530_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ return rv;
+}
+
+struct SPacket0x7531_Fixed
+{
+ uint16_t packet_id;
+ Version version;
+};
+struct NetSPacket0x7531_Fixed
+{
+ Little16 packet_id;
+ NetVersion version;
+};
+static_assert(offsetof(NetSPacket0x7531_Fixed, packet_id) == 0, "offsetof(NetSPacket0x7531_Fixed, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x7531_Fixed, version) == 2, "offsetof(NetSPacket0x7531_Fixed, version) == 2");
+static_assert(sizeof(NetSPacket0x7531_Fixed) == 10, "sizeof(NetSPacket0x7531_Fixed) == 10");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x7531_Fixed *network, SPacket0x7531_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->version, native.version);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x7531_Fixed *native, NetSPacket0x7531_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->version, network.version);
+ return rv;
+}
+
+struct RPacket0x7532_Fixed
+{
+ uint16_t packet_id;
+};
+struct NetRPacket0x7532_Fixed
+{
+ Little16 packet_id;
+};
+static_assert(offsetof(NetRPacket0x7532_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7532_Fixed, packet_id) == 0");
+static_assert(sizeof(NetRPacket0x7532_Fixed) == 2, "sizeof(NetRPacket0x7532_Fixed) == 2");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x7532_Fixed *network, RPacket0x7532_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x7532_Fixed *native, NetRPacket0x7532_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ return rv;
+}
+
+
+#endif // TMWA_PROTO2_ANY_USER_HPP
diff --git a/src/proto2/any-user_test.cpp b/src/proto2/any-user_test.cpp
new file mode 100644
index 0000000..5096d24
--- /dev/null
+++ b/src/proto2/any-user_test.cpp
@@ -0,0 +1,23 @@
+#include "any-user.hpp"
+// any-user_test.cpp - TMWA network protocol: any/user
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+// This is a generated file, edit tools/protocol.py instead
+
+#include "../poison.hpp"
diff --git a/src/proto2/char-map.hpp b/src/proto2/char-map.hpp
new file mode 100644
index 0000000..3caa2df
--- /dev/null
+++ b/src/proto2/char-map.hpp
@@ -0,0 +1,31 @@
+#ifndef TMWA_PROTO2_CHAR_MAP_HPP
+#define TMWA_PROTO2_CHAR_MAP_HPP
+// char-map.hpp - TMWA network protocol: char/map
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+// This is a generated file, edit tools/protocol.py instead
+
+# include "fwd.hpp"
+
+# include "types.hpp"
+
+// This is an internal protocol, and can be changed without notice
+
+
+#endif // TMWA_PROTO2_CHAR_MAP_HPP
diff --git a/src/proto2/char-map_test.cpp b/src/proto2/char-map_test.cpp
new file mode 100644
index 0000000..1b6ccb1
--- /dev/null
+++ b/src/proto2/char-map_test.cpp
@@ -0,0 +1,23 @@
+#include "char-map.hpp"
+// char-map_test.cpp - TMWA network protocol: char/map
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+// This is a generated file, edit tools/protocol.py instead
+
+#include "../poison.hpp"
diff --git a/src/proto2/char-user.hpp b/src/proto2/char-user.hpp
new file mode 100644
index 0000000..d85d768
--- /dev/null
+++ b/src/proto2/char-user.hpp
@@ -0,0 +1,31 @@
+#ifndef TMWA_PROTO2_CHAR_USER_HPP
+#define TMWA_PROTO2_CHAR_USER_HPP
+// char-user.hpp - TMWA network protocol: char/user
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+// This is a generated file, edit tools/protocol.py instead
+
+# include "fwd.hpp"
+
+# include "types.hpp"
+
+// This is a public protocol, and changes require client cooperation
+
+
+#endif // TMWA_PROTO2_CHAR_USER_HPP
diff --git a/src/proto2/char-user_test.cpp b/src/proto2/char-user_test.cpp
new file mode 100644
index 0000000..952d196
--- /dev/null
+++ b/src/proto2/char-user_test.cpp
@@ -0,0 +1,23 @@
+#include "char-user.hpp"
+// char-user_test.cpp - TMWA network protocol: char/user
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+// This is a generated file, edit tools/protocol.py instead
+
+#include "../poison.hpp"
diff --git a/src/proto2/fwd.hpp b/src/proto2/fwd.hpp
new file mode 100644
index 0000000..023ebe5
--- /dev/null
+++ b/src/proto2/fwd.hpp
@@ -0,0 +1,26 @@
+#ifndef TMWA_PROTO2_FWD_HPP
+#define TMWA_PROTO2_FWD_HPP
+// proto2/fwd.hpp - Forward declarations of network packets
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# include "../sanity.hpp"
+
+// TODO put stuff here
+
+#endif // TMWA_PROTO2_FWD_HPP
diff --git a/src/proto2/include_cstdint_test.cpp b/src/proto2/include_cstdint_test.cpp
new file mode 100644
index 0000000..a067574
--- /dev/null
+++ b/src/proto2/include_cstdint_test.cpp
@@ -0,0 +1,26 @@
+#include <cstdint>
+// include_cstdint_test.cpp - testsuite for protocol includes
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+#include "../poison.hpp"
+
+using Test_uint8_t = uint8_t;
+using Test_uint16_t = uint16_t;
+using Test_uint32_t = uint32_t;
+using Test_uint64_t = uint64_t;
diff --git a/src/proto2/include_enums_test.cpp b/src/proto2/include_enums_test.cpp
new file mode 100644
index 0000000..a335c81
--- /dev/null
+++ b/src/proto2/include_enums_test.cpp
@@ -0,0 +1,23 @@
+#include "../mmo/enums.hpp"
+// include_enums_test.cpp - testsuite for protocol includes
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+#include "../poison.hpp"
+
+using Test_SEX = SEX;
diff --git a/src/proto2/include_human_time_diff_test.cpp b/src/proto2/include_human_time_diff_test.cpp
new file mode 100644
index 0000000..25a111d
--- /dev/null
+++ b/src/proto2/include_human_time_diff_test.cpp
@@ -0,0 +1,23 @@
+#include "../mmo/human_time_diff.hpp"
+// include_human_time_diff_test.cpp - testsuite for protocol includes
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+#include "../poison.hpp"
+
+using Test_HumanTimeDiff = HumanTimeDiff;
diff --git a/src/proto2/include_ids_test.cpp b/src/proto2/include_ids_test.cpp
new file mode 100644
index 0000000..63e1753
--- /dev/null
+++ b/src/proto2/include_ids_test.cpp
@@ -0,0 +1,29 @@
+#include "../mmo/ids.hpp"
+// include_ids_test.cpp - testsuite for protocol includes
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+#include "../poison.hpp"
+
+using Test_Species = Species;
+using Test_AccountId = AccountId;
+using Test_CharId = CharId;
+using Test_PartyId = PartyId;
+using Test_ItemNameId = ItemNameId;
+using Test_BlockId = BlockId;
+using Test_GmLevel = GmLevel;
diff --git a/src/proto2/include_ip_test.cpp b/src/proto2/include_ip_test.cpp
new file mode 100644
index 0000000..bae7c3a
--- /dev/null
+++ b/src/proto2/include_ip_test.cpp
@@ -0,0 +1,23 @@
+#include "../net/ip.hpp"
+// include_ip_test.cpp - testsuite for protocol includes
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+#include "../poison.hpp"
+
+using Test_IP4Address = IP4Address;
diff --git a/src/proto2/include_little_test.cpp b/src/proto2/include_little_test.cpp
new file mode 100644
index 0000000..70cb5d2
--- /dev/null
+++ b/src/proto2/include_little_test.cpp
@@ -0,0 +1,26 @@
+#include "../ints/little.hpp"
+// include_little_test.cpp - testsuite for protocol includes
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+#include "../poison.hpp"
+
+using Test_Byte = Byte;
+using Test_Little16 = Little16;
+using Test_Little32 = Little32;
+using Test_Little64 = Little64;
diff --git a/src/proto2/include_strs_test.cpp b/src/proto2/include_strs_test.cpp
new file mode 100644
index 0000000..1087f3a
--- /dev/null
+++ b/src/proto2/include_strs_test.cpp
@@ -0,0 +1,27 @@
+#include "../mmo/strs.hpp"
+// include_strs_test.cpp - testsuite for protocol includes
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+#include "../poison.hpp"
+
+using Test_AccountName = AccountName;
+using Test_AccountPass = AccountPass;
+using Test_AccountEmail = AccountEmail;
+using Test_ServerName = ServerName;
+using Test_VarName = VarName;
diff --git a/src/proto2/include_utils_test.cpp b/src/proto2/include_utils_test.cpp
new file mode 100644
index 0000000..840ed5f
--- /dev/null
+++ b/src/proto2/include_utils_test.cpp
@@ -0,0 +1,25 @@
+#include "../mmo/utils.hpp"
+// include_utils_test.cpp - testsuite for protocol includes
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+#include "../poison.hpp"
+
+using Test_TimeT = TimeT;
+using Test_timestamp_seconds_buffer = timestamp_seconds_buffer;
+using Test_timestamp_milliseconds_buffer = timestamp_milliseconds_buffer;
diff --git a/src/proto2/include_version_test.cpp b/src/proto2/include_version_test.cpp
new file mode 100644
index 0000000..d635efc
--- /dev/null
+++ b/src/proto2/include_version_test.cpp
@@ -0,0 +1,23 @@
+#include "../mmo/version.hpp"
+// include_version_test.cpp - testsuite for protocol includes
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+#include "../poison.hpp"
+
+using Test_Version = Version;
diff --git a/src/proto2/include_vstring_test.cpp b/src/proto2/include_vstring_test.cpp
new file mode 100644
index 0000000..f415127
--- /dev/null
+++ b/src/proto2/include_vstring_test.cpp
@@ -0,0 +1,27 @@
+#include "../strings/vstring.hpp"
+// include_vstring_test.cpp - testsuite for protocol includes
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+#include "../poison.hpp"
+
+using Test_VString_15_ = VString<15>;
+using Test_VString_19_ = VString<19>;
+using Test_VString_23_ = VString<23>;
+using Test_VString_31_ = VString<31>;
+using Test_VString_39_ = VString<39>;
diff --git a/src/proto2/login-admin.hpp b/src/proto2/login-admin.hpp
new file mode 100644
index 0000000..635ed44
--- /dev/null
+++ b/src/proto2/login-admin.hpp
@@ -0,0 +1,1781 @@
+#ifndef TMWA_PROTO2_LOGIN_ADMIN_HPP
+#define TMWA_PROTO2_LOGIN_ADMIN_HPP
+// login-admin.hpp - TMWA network protocol: login/admin
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+// This is a generated file, edit tools/protocol.py instead
+
+# include "fwd.hpp"
+
+# include "types.hpp"
+
+// This is an internal protocol, and can be changed without notice
+
+struct RPacket0x2726_Head
+{
+ uint16_t packet_id;
+ uint16_t unused;
+ uint32_t string_length;
+};
+struct NetRPacket0x2726_Head
+{
+ Little16 packet_id;
+ Little16 unused;
+ Little32 string_length;
+};
+static_assert(offsetof(NetRPacket0x2726_Head, packet_id) == 0, "offsetof(NetRPacket0x2726_Head, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x2726_Head, unused) == 2, "offsetof(NetRPacket0x2726_Head, unused) == 2");
+static_assert(offsetof(NetRPacket0x2726_Head, string_length) == 4, "offsetof(NetRPacket0x2726_Head, string_length) == 4");
+static_assert(sizeof(NetRPacket0x2726_Head) == 8, "sizeof(NetRPacket0x2726_Head) == 8");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x2726_Head *network, RPacket0x2726_Head native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->unused, native.unused);
+ rv &= native_to_network(&network->string_length, native.string_length);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x2726_Head *native, NetRPacket0x2726_Head network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->unused, network.unused);
+ rv &= network_to_native(&native->string_length, network.string_length);
+ return rv;
+}
+
+struct RPacket0x2726_Repeat
+{
+ uint8_t c;
+};
+struct NetRPacket0x2726_Repeat
+{
+ Byte c;
+};
+static_assert(offsetof(NetRPacket0x2726_Repeat, c) == 0, "offsetof(NetRPacket0x2726_Repeat, c) == 0");
+static_assert(sizeof(NetRPacket0x2726_Repeat) == 1, "sizeof(NetRPacket0x2726_Repeat) == 1");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x2726_Repeat *network, RPacket0x2726_Repeat native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->c, native.c);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x2726_Repeat *native, NetRPacket0x2726_Repeat network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->c, network.c);
+ return rv;
+}
+
+struct RPacket0x7920_Head
+{
+ uint16_t packet_id;
+ uint32_t start_account_id;
+ uint32_t end_account_id;
+};
+struct NetRPacket0x7920_Head
+{
+ Little16 packet_id;
+ Little32 start_account_id;
+ Little32 end_account_id;
+};
+static_assert(offsetof(NetRPacket0x7920_Head, packet_id) == 0, "offsetof(NetRPacket0x7920_Head, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x7920_Head, start_account_id) == 2, "offsetof(NetRPacket0x7920_Head, start_account_id) == 2");
+static_assert(offsetof(NetRPacket0x7920_Head, end_account_id) == 6, "offsetof(NetRPacket0x7920_Head, end_account_id) == 6");
+static_assert(sizeof(NetRPacket0x7920_Head) == 10, "sizeof(NetRPacket0x7920_Head) == 10");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x7920_Head *network, RPacket0x7920_Head native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->start_account_id, native.start_account_id);
+ rv &= native_to_network(&network->end_account_id, native.end_account_id);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x7920_Head *native, NetRPacket0x7920_Head network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->start_account_id, network.start_account_id);
+ rv &= network_to_native(&native->end_account_id, network.end_account_id);
+ return rv;
+}
+
+struct RPacket0x7920_Repeat
+{
+ uint8_t c;
+};
+struct NetRPacket0x7920_Repeat
+{
+ Byte c;
+};
+static_assert(offsetof(NetRPacket0x7920_Repeat, c) == 0, "offsetof(NetRPacket0x7920_Repeat, c) == 0");
+static_assert(sizeof(NetRPacket0x7920_Repeat) == 1, "sizeof(NetRPacket0x7920_Repeat) == 1");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x7920_Repeat *network, RPacket0x7920_Repeat native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->c, native.c);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x7920_Repeat *native, NetRPacket0x7920_Repeat network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->c, network.c);
+ return rv;
+}
+
+struct SPacket0x7921_Head
+{
+ uint16_t packet_id;
+ uint16_t packet_length;
+};
+struct NetSPacket0x7921_Head
+{
+ Little16 packet_id;
+ Little16 packet_length;
+};
+static_assert(offsetof(NetSPacket0x7921_Head, packet_id) == 0, "offsetof(NetSPacket0x7921_Head, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x7921_Head, packet_length) == 2, "offsetof(NetSPacket0x7921_Head, packet_length) == 2");
+static_assert(sizeof(NetSPacket0x7921_Head) == 4, "sizeof(NetSPacket0x7921_Head) == 4");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x7921_Head *network, SPacket0x7921_Head native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->packet_length, native.packet_length);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x7921_Head *native, NetSPacket0x7921_Head network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->packet_length, network.packet_length);
+ return rv;
+}
+
+struct SPacket0x7921_Repeat
+{
+ uint32_t account_id;
+ GmLevel gm_level;
+ AccountName account_name;
+ SEX sex;
+ uint32_t login_count;
+ uint32_t status;
+};
+struct NetSPacket0x7921_Repeat
+{
+ Little32 account_id;
+ Byte gm_level;
+ NetString<sizeof(AccountName)> account_name;
+ Byte sex;
+ Little32 login_count;
+ Little32 status;
+};
+static_assert(offsetof(NetSPacket0x7921_Repeat, account_id) == 0, "offsetof(NetSPacket0x7921_Repeat, account_id) == 0");
+static_assert(offsetof(NetSPacket0x7921_Repeat, gm_level) == 4, "offsetof(NetSPacket0x7921_Repeat, gm_level) == 4");
+static_assert(offsetof(NetSPacket0x7921_Repeat, account_name) == 5, "offsetof(NetSPacket0x7921_Repeat, account_name) == 5");
+static_assert(offsetof(NetSPacket0x7921_Repeat, sex) == 29, "offsetof(NetSPacket0x7921_Repeat, sex) == 29");
+static_assert(offsetof(NetSPacket0x7921_Repeat, login_count) == 30, "offsetof(NetSPacket0x7921_Repeat, login_count) == 30");
+static_assert(offsetof(NetSPacket0x7921_Repeat, status) == 34, "offsetof(NetSPacket0x7921_Repeat, status) == 34");
+static_assert(sizeof(NetSPacket0x7921_Repeat) == 38, "sizeof(NetSPacket0x7921_Repeat) == 38");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x7921_Repeat *network, SPacket0x7921_Repeat native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->gm_level, native.gm_level);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ rv &= native_to_network(&network->sex, native.sex);
+ rv &= native_to_network(&network->login_count, native.login_count);
+ rv &= native_to_network(&network->status, native.status);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x7921_Repeat *native, NetSPacket0x7921_Repeat network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->gm_level, network.gm_level);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ rv &= network_to_native(&native->sex, network.sex);
+ rv &= network_to_native(&native->login_count, network.login_count);
+ rv &= network_to_native(&native->status, network.status);
+ return rv;
+}
+
+struct RPacket0x7924_Fixed
+{
+ uint16_t packet_id;
+ uint32_t source_item_id;
+ uint32_t dest_item_id;
+};
+struct NetRPacket0x7924_Fixed
+{
+ Little16 packet_id;
+ Little32 source_item_id;
+ Little32 dest_item_id;
+};
+static_assert(offsetof(NetRPacket0x7924_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7924_Fixed, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x7924_Fixed, source_item_id) == 2, "offsetof(NetRPacket0x7924_Fixed, source_item_id) == 2");
+static_assert(offsetof(NetRPacket0x7924_Fixed, dest_item_id) == 6, "offsetof(NetRPacket0x7924_Fixed, dest_item_id) == 6");
+static_assert(sizeof(NetRPacket0x7924_Fixed) == 10, "sizeof(NetRPacket0x7924_Fixed) == 10");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x7924_Fixed *network, RPacket0x7924_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->source_item_id, native.source_item_id);
+ rv &= native_to_network(&network->dest_item_id, native.dest_item_id);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x7924_Fixed *native, NetRPacket0x7924_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->source_item_id, network.source_item_id);
+ rv &= network_to_native(&native->dest_item_id, network.dest_item_id);
+ return rv;
+}
+
+struct SPacket0x7925_Fixed
+{
+ uint16_t packet_id;
+};
+struct NetSPacket0x7925_Fixed
+{
+ Little16 packet_id;
+};
+static_assert(offsetof(NetSPacket0x7925_Fixed, packet_id) == 0, "offsetof(NetSPacket0x7925_Fixed, packet_id) == 0");
+static_assert(sizeof(NetSPacket0x7925_Fixed) == 2, "sizeof(NetSPacket0x7925_Fixed) == 2");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x7925_Fixed *network, SPacket0x7925_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x7925_Fixed *native, NetSPacket0x7925_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ return rv;
+}
+
+struct RPacket0x7930_Fixed
+{
+ uint16_t packet_id;
+ AccountName account_name;
+ AccountPass password;
+ SEX sex;
+ AccountEmail email;
+};
+struct NetRPacket0x7930_Fixed
+{
+ Little16 packet_id;
+ NetString<sizeof(AccountName)> account_name;
+ NetString<sizeof(AccountPass)> password;
+ Byte sex;
+ NetString<sizeof(AccountEmail)> email;
+};
+static_assert(offsetof(NetRPacket0x7930_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7930_Fixed, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x7930_Fixed, account_name) == 2, "offsetof(NetRPacket0x7930_Fixed, account_name) == 2");
+static_assert(offsetof(NetRPacket0x7930_Fixed, password) == 26, "offsetof(NetRPacket0x7930_Fixed, password) == 26");
+static_assert(offsetof(NetRPacket0x7930_Fixed, sex) == 50, "offsetof(NetRPacket0x7930_Fixed, sex) == 50");
+static_assert(offsetof(NetRPacket0x7930_Fixed, email) == 51, "offsetof(NetRPacket0x7930_Fixed, email) == 51");
+static_assert(sizeof(NetRPacket0x7930_Fixed) == 91, "sizeof(NetRPacket0x7930_Fixed) == 91");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x7930_Fixed *network, RPacket0x7930_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ rv &= native_to_network(&network->password, native.password);
+ rv &= native_to_network(&network->sex, native.sex);
+ rv &= native_to_network(&network->email, native.email);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x7930_Fixed *native, NetRPacket0x7930_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ rv &= network_to_native(&native->password, network.password);
+ rv &= network_to_native(&native->sex, network.sex);
+ rv &= network_to_native(&native->email, network.email);
+ return rv;
+}
+
+struct SPacket0x7931_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ AccountName account_name;
+};
+struct NetSPacket0x7931_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+ NetString<sizeof(AccountName)> account_name;
+};
+static_assert(offsetof(NetSPacket0x7931_Fixed, packet_id) == 0, "offsetof(NetSPacket0x7931_Fixed, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x7931_Fixed, account_id) == 2, "offsetof(NetSPacket0x7931_Fixed, account_id) == 2");
+static_assert(offsetof(NetSPacket0x7931_Fixed, account_name) == 6, "offsetof(NetSPacket0x7931_Fixed, account_name) == 6");
+static_assert(sizeof(NetSPacket0x7931_Fixed) == 30, "sizeof(NetSPacket0x7931_Fixed) == 30");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x7931_Fixed *network, SPacket0x7931_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x7931_Fixed *native, NetSPacket0x7931_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ return rv;
+}
+
+struct RPacket0x7932_Fixed
+{
+ uint16_t packet_id;
+ AccountName account_name;
+};
+struct NetRPacket0x7932_Fixed
+{
+ Little16 packet_id;
+ NetString<sizeof(AccountName)> account_name;
+};
+static_assert(offsetof(NetRPacket0x7932_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7932_Fixed, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x7932_Fixed, account_name) == 2, "offsetof(NetRPacket0x7932_Fixed, account_name) == 2");
+static_assert(sizeof(NetRPacket0x7932_Fixed) == 26, "sizeof(NetRPacket0x7932_Fixed) == 26");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x7932_Fixed *network, RPacket0x7932_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x7932_Fixed *native, NetRPacket0x7932_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ return rv;
+}
+
+struct SPacket0x7933_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ AccountName account_name;
+};
+struct NetSPacket0x7933_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+ NetString<sizeof(AccountName)> account_name;
+};
+static_assert(offsetof(NetSPacket0x7933_Fixed, packet_id) == 0, "offsetof(NetSPacket0x7933_Fixed, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x7933_Fixed, account_id) == 2, "offsetof(NetSPacket0x7933_Fixed, account_id) == 2");
+static_assert(offsetof(NetSPacket0x7933_Fixed, account_name) == 6, "offsetof(NetSPacket0x7933_Fixed, account_name) == 6");
+static_assert(sizeof(NetSPacket0x7933_Fixed) == 30, "sizeof(NetSPacket0x7933_Fixed) == 30");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x7933_Fixed *network, SPacket0x7933_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x7933_Fixed *native, NetSPacket0x7933_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ return rv;
+}
+
+struct RPacket0x7934_Fixed
+{
+ uint16_t packet_id;
+ AccountName account_name;
+ AccountPass password;
+};
+struct NetRPacket0x7934_Fixed
+{
+ Little16 packet_id;
+ NetString<sizeof(AccountName)> account_name;
+ NetString<sizeof(AccountPass)> password;
+};
+static_assert(offsetof(NetRPacket0x7934_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7934_Fixed, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x7934_Fixed, account_name) == 2, "offsetof(NetRPacket0x7934_Fixed, account_name) == 2");
+static_assert(offsetof(NetRPacket0x7934_Fixed, password) == 26, "offsetof(NetRPacket0x7934_Fixed, password) == 26");
+static_assert(sizeof(NetRPacket0x7934_Fixed) == 50, "sizeof(NetRPacket0x7934_Fixed) == 50");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x7934_Fixed *network, RPacket0x7934_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ rv &= native_to_network(&network->password, native.password);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x7934_Fixed *native, NetRPacket0x7934_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ rv &= network_to_native(&native->password, network.password);
+ return rv;
+}
+
+struct SPacket0x7935_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ AccountName account_name;
+};
+struct NetSPacket0x7935_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+ NetString<sizeof(AccountName)> account_name;
+};
+static_assert(offsetof(NetSPacket0x7935_Fixed, packet_id) == 0, "offsetof(NetSPacket0x7935_Fixed, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x7935_Fixed, account_id) == 2, "offsetof(NetSPacket0x7935_Fixed, account_id) == 2");
+static_assert(offsetof(NetSPacket0x7935_Fixed, account_name) == 6, "offsetof(NetSPacket0x7935_Fixed, account_name) == 6");
+static_assert(sizeof(NetSPacket0x7935_Fixed) == 30, "sizeof(NetSPacket0x7935_Fixed) == 30");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x7935_Fixed *network, SPacket0x7935_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x7935_Fixed *native, NetSPacket0x7935_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ return rv;
+}
+
+struct RPacket0x7936_Fixed
+{
+ uint16_t packet_id;
+ AccountName account_name;
+ uint32_t status;
+ timestamp_seconds_buffer error_message;
+};
+struct NetRPacket0x7936_Fixed
+{
+ Little16 packet_id;
+ NetString<sizeof(AccountName)> account_name;
+ Little32 status;
+ NetString<sizeof(timestamp_seconds_buffer)> error_message;
+};
+static_assert(offsetof(NetRPacket0x7936_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7936_Fixed, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x7936_Fixed, account_name) == 2, "offsetof(NetRPacket0x7936_Fixed, account_name) == 2");
+static_assert(offsetof(NetRPacket0x7936_Fixed, status) == 26, "offsetof(NetRPacket0x7936_Fixed, status) == 26");
+static_assert(offsetof(NetRPacket0x7936_Fixed, error_message) == 30, "offsetof(NetRPacket0x7936_Fixed, error_message) == 30");
+static_assert(sizeof(NetRPacket0x7936_Fixed) == 50, "sizeof(NetRPacket0x7936_Fixed) == 50");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x7936_Fixed *network, RPacket0x7936_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ rv &= native_to_network(&network->status, native.status);
+ rv &= native_to_network(&network->error_message, native.error_message);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x7936_Fixed *native, NetRPacket0x7936_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ rv &= network_to_native(&native->status, network.status);
+ rv &= network_to_native(&native->error_message, network.error_message);
+ return rv;
+}
+
+struct SPacket0x7937_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ AccountName account_name;
+};
+struct NetSPacket0x7937_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+ NetString<sizeof(AccountName)> account_name;
+};
+static_assert(offsetof(NetSPacket0x7937_Fixed, packet_id) == 0, "offsetof(NetSPacket0x7937_Fixed, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x7937_Fixed, account_id) == 2, "offsetof(NetSPacket0x7937_Fixed, account_id) == 2");
+static_assert(offsetof(NetSPacket0x7937_Fixed, account_name) == 6, "offsetof(NetSPacket0x7937_Fixed, account_name) == 6");
+static_assert(sizeof(NetSPacket0x7937_Fixed) == 30, "sizeof(NetSPacket0x7937_Fixed) == 30");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x7937_Fixed *network, SPacket0x7937_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x7937_Fixed *native, NetSPacket0x7937_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ return rv;
+}
+
+struct RPacket0x7938_Fixed
+{
+ uint16_t packet_id;
+};
+struct NetRPacket0x7938_Fixed
+{
+ Little16 packet_id;
+};
+static_assert(offsetof(NetRPacket0x7938_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7938_Fixed, packet_id) == 0");
+static_assert(sizeof(NetRPacket0x7938_Fixed) == 2, "sizeof(NetRPacket0x7938_Fixed) == 2");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x7938_Fixed *network, RPacket0x7938_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x7938_Fixed *native, NetRPacket0x7938_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ return rv;
+}
+
+struct SPacket0x7939_Head
+{
+ uint16_t packet_id;
+ uint16_t packet_length;
+};
+struct NetSPacket0x7939_Head
+{
+ Little16 packet_id;
+ Little16 packet_length;
+};
+static_assert(offsetof(NetSPacket0x7939_Head, packet_id) == 0, "offsetof(NetSPacket0x7939_Head, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x7939_Head, packet_length) == 2, "offsetof(NetSPacket0x7939_Head, packet_length) == 2");
+static_assert(sizeof(NetSPacket0x7939_Head) == 4, "sizeof(NetSPacket0x7939_Head) == 4");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x7939_Head *network, SPacket0x7939_Head native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->packet_length, native.packet_length);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x7939_Head *native, NetSPacket0x7939_Head network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->packet_length, network.packet_length);
+ return rv;
+}
+
+struct SPacket0x7939_Repeat
+{
+ IP4Address ip;
+ uint16_t port;
+ ServerName name;
+ uint16_t users;
+ uint16_t maintenance;
+ uint16_t is_new;
+};
+struct NetSPacket0x7939_Repeat
+{
+ IP4Address ip;
+ Little16 port;
+ NetString<sizeof(ServerName)> name;
+ Little16 users;
+ Little16 maintenance;
+ Little16 is_new;
+};
+static_assert(offsetof(NetSPacket0x7939_Repeat, ip) == 0, "offsetof(NetSPacket0x7939_Repeat, ip) == 0");
+static_assert(offsetof(NetSPacket0x7939_Repeat, port) == 4, "offsetof(NetSPacket0x7939_Repeat, port) == 4");
+static_assert(offsetof(NetSPacket0x7939_Repeat, name) == 6, "offsetof(NetSPacket0x7939_Repeat, name) == 6");
+static_assert(offsetof(NetSPacket0x7939_Repeat, users) == 26, "offsetof(NetSPacket0x7939_Repeat, users) == 26");
+static_assert(offsetof(NetSPacket0x7939_Repeat, maintenance) == 28, "offsetof(NetSPacket0x7939_Repeat, maintenance) == 28");
+static_assert(offsetof(NetSPacket0x7939_Repeat, is_new) == 30, "offsetof(NetSPacket0x7939_Repeat, is_new) == 30");
+static_assert(sizeof(NetSPacket0x7939_Repeat) == 32, "sizeof(NetSPacket0x7939_Repeat) == 32");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x7939_Repeat *network, SPacket0x7939_Repeat native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->ip, native.ip);
+ rv &= native_to_network(&network->port, native.port);
+ rv &= native_to_network(&network->name, native.name);
+ rv &= native_to_network(&network->users, native.users);
+ rv &= native_to_network(&network->maintenance, native.maintenance);
+ rv &= native_to_network(&network->is_new, native.is_new);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x7939_Repeat *native, NetSPacket0x7939_Repeat network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->ip, network.ip);
+ rv &= network_to_native(&native->port, network.port);
+ rv &= network_to_native(&native->name, network.name);
+ rv &= network_to_native(&native->users, network.users);
+ rv &= network_to_native(&native->maintenance, network.maintenance);
+ rv &= network_to_native(&native->is_new, network.is_new);
+ return rv;
+}
+
+struct RPacket0x793a_Fixed
+{
+ uint16_t packet_id;
+ AccountName account_name;
+ AccountPass password;
+};
+struct NetRPacket0x793a_Fixed
+{
+ Little16 packet_id;
+ NetString<sizeof(AccountName)> account_name;
+ NetString<sizeof(AccountPass)> password;
+};
+static_assert(offsetof(NetRPacket0x793a_Fixed, packet_id) == 0, "offsetof(NetRPacket0x793a_Fixed, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x793a_Fixed, account_name) == 2, "offsetof(NetRPacket0x793a_Fixed, account_name) == 2");
+static_assert(offsetof(NetRPacket0x793a_Fixed, password) == 26, "offsetof(NetRPacket0x793a_Fixed, password) == 26");
+static_assert(sizeof(NetRPacket0x793a_Fixed) == 50, "sizeof(NetRPacket0x793a_Fixed) == 50");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x793a_Fixed *network, RPacket0x793a_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ rv &= native_to_network(&network->password, native.password);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x793a_Fixed *native, NetRPacket0x793a_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ rv &= network_to_native(&native->password, network.password);
+ return rv;
+}
+
+struct SPacket0x793b_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ AccountName account_name;
+};
+struct NetSPacket0x793b_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+ NetString<sizeof(AccountName)> account_name;
+};
+static_assert(offsetof(NetSPacket0x793b_Fixed, packet_id) == 0, "offsetof(NetSPacket0x793b_Fixed, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x793b_Fixed, account_id) == 2, "offsetof(NetSPacket0x793b_Fixed, account_id) == 2");
+static_assert(offsetof(NetSPacket0x793b_Fixed, account_name) == 6, "offsetof(NetSPacket0x793b_Fixed, account_name) == 6");
+static_assert(sizeof(NetSPacket0x793b_Fixed) == 30, "sizeof(NetSPacket0x793b_Fixed) == 30");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x793b_Fixed *network, SPacket0x793b_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x793b_Fixed *native, NetSPacket0x793b_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ return rv;
+}
+
+struct RPacket0x793c_Fixed
+{
+ uint16_t packet_id;
+ AccountName account_name;
+ SEX sex;
+};
+struct NetRPacket0x793c_Fixed
+{
+ Little16 packet_id;
+ NetString<sizeof(AccountName)> account_name;
+ Byte sex;
+};
+static_assert(offsetof(NetRPacket0x793c_Fixed, packet_id) == 0, "offsetof(NetRPacket0x793c_Fixed, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x793c_Fixed, account_name) == 2, "offsetof(NetRPacket0x793c_Fixed, account_name) == 2");
+static_assert(offsetof(NetRPacket0x793c_Fixed, sex) == 26, "offsetof(NetRPacket0x793c_Fixed, sex) == 26");
+static_assert(sizeof(NetRPacket0x793c_Fixed) == 27, "sizeof(NetRPacket0x793c_Fixed) == 27");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x793c_Fixed *network, RPacket0x793c_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ rv &= native_to_network(&network->sex, native.sex);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x793c_Fixed *native, NetRPacket0x793c_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ rv &= network_to_native(&native->sex, network.sex);
+ return rv;
+}
+
+struct SPacket0x793d_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ AccountName account_name;
+};
+struct NetSPacket0x793d_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+ NetString<sizeof(AccountName)> account_name;
+};
+static_assert(offsetof(NetSPacket0x793d_Fixed, packet_id) == 0, "offsetof(NetSPacket0x793d_Fixed, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x793d_Fixed, account_id) == 2, "offsetof(NetSPacket0x793d_Fixed, account_id) == 2");
+static_assert(offsetof(NetSPacket0x793d_Fixed, account_name) == 6, "offsetof(NetSPacket0x793d_Fixed, account_name) == 6");
+static_assert(sizeof(NetSPacket0x793d_Fixed) == 30, "sizeof(NetSPacket0x793d_Fixed) == 30");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x793d_Fixed *network, SPacket0x793d_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x793d_Fixed *native, NetSPacket0x793d_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ return rv;
+}
+
+struct RPacket0x793e_Fixed
+{
+ uint16_t packet_id;
+ AccountName account_name;
+ GmLevel gm_level;
+};
+struct NetRPacket0x793e_Fixed
+{
+ Little16 packet_id;
+ NetString<sizeof(AccountName)> account_name;
+ Byte gm_level;
+};
+static_assert(offsetof(NetRPacket0x793e_Fixed, packet_id) == 0, "offsetof(NetRPacket0x793e_Fixed, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x793e_Fixed, account_name) == 2, "offsetof(NetRPacket0x793e_Fixed, account_name) == 2");
+static_assert(offsetof(NetRPacket0x793e_Fixed, gm_level) == 26, "offsetof(NetRPacket0x793e_Fixed, gm_level) == 26");
+static_assert(sizeof(NetRPacket0x793e_Fixed) == 27, "sizeof(NetRPacket0x793e_Fixed) == 27");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x793e_Fixed *network, RPacket0x793e_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ rv &= native_to_network(&network->gm_level, native.gm_level);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x793e_Fixed *native, NetRPacket0x793e_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ rv &= network_to_native(&native->gm_level, network.gm_level);
+ return rv;
+}
+
+struct SPacket0x793f_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ AccountName account_name;
+};
+struct NetSPacket0x793f_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+ NetString<sizeof(AccountName)> account_name;
+};
+static_assert(offsetof(NetSPacket0x793f_Fixed, packet_id) == 0, "offsetof(NetSPacket0x793f_Fixed, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x793f_Fixed, account_id) == 2, "offsetof(NetSPacket0x793f_Fixed, account_id) == 2");
+static_assert(offsetof(NetSPacket0x793f_Fixed, account_name) == 6, "offsetof(NetSPacket0x793f_Fixed, account_name) == 6");
+static_assert(sizeof(NetSPacket0x793f_Fixed) == 30, "sizeof(NetSPacket0x793f_Fixed) == 30");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x793f_Fixed *network, SPacket0x793f_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x793f_Fixed *native, NetSPacket0x793f_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ return rv;
+}
+
+struct RPacket0x7940_Fixed
+{
+ uint16_t packet_id;
+ AccountName account_name;
+ AccountEmail email;
+};
+struct NetRPacket0x7940_Fixed
+{
+ Little16 packet_id;
+ NetString<sizeof(AccountName)> account_name;
+ NetString<sizeof(AccountEmail)> email;
+};
+static_assert(offsetof(NetRPacket0x7940_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7940_Fixed, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x7940_Fixed, account_name) == 2, "offsetof(NetRPacket0x7940_Fixed, account_name) == 2");
+static_assert(offsetof(NetRPacket0x7940_Fixed, email) == 26, "offsetof(NetRPacket0x7940_Fixed, email) == 26");
+static_assert(sizeof(NetRPacket0x7940_Fixed) == 66, "sizeof(NetRPacket0x7940_Fixed) == 66");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x7940_Fixed *network, RPacket0x7940_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ rv &= native_to_network(&network->email, native.email);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x7940_Fixed *native, NetRPacket0x7940_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ rv &= network_to_native(&native->email, network.email);
+ return rv;
+}
+
+struct SPacket0x7941_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ AccountName account_name;
+};
+struct NetSPacket0x7941_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+ NetString<sizeof(AccountName)> account_name;
+};
+static_assert(offsetof(NetSPacket0x7941_Fixed, packet_id) == 0, "offsetof(NetSPacket0x7941_Fixed, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x7941_Fixed, account_id) == 2, "offsetof(NetSPacket0x7941_Fixed, account_id) == 2");
+static_assert(offsetof(NetSPacket0x7941_Fixed, account_name) == 6, "offsetof(NetSPacket0x7941_Fixed, account_name) == 6");
+static_assert(sizeof(NetSPacket0x7941_Fixed) == 30, "sizeof(NetSPacket0x7941_Fixed) == 30");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x7941_Fixed *network, SPacket0x7941_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x7941_Fixed *native, NetSPacket0x7941_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ return rv;
+}
+
+struct RPacket0x7942_Head
+{
+ uint16_t packet_id;
+ AccountName account_name;
+ uint16_t string_length;
+};
+struct NetRPacket0x7942_Head
+{
+ Little16 packet_id;
+ NetString<sizeof(AccountName)> account_name;
+ Little16 string_length;
+};
+static_assert(offsetof(NetRPacket0x7942_Head, packet_id) == 0, "offsetof(NetRPacket0x7942_Head, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x7942_Head, account_name) == 2, "offsetof(NetRPacket0x7942_Head, account_name) == 2");
+static_assert(offsetof(NetRPacket0x7942_Head, string_length) == 26, "offsetof(NetRPacket0x7942_Head, string_length) == 26");
+static_assert(sizeof(NetRPacket0x7942_Head) == 28, "sizeof(NetRPacket0x7942_Head) == 28");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x7942_Head *network, RPacket0x7942_Head native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ rv &= native_to_network(&network->string_length, native.string_length);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x7942_Head *native, NetRPacket0x7942_Head network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ rv &= network_to_native(&native->string_length, network.string_length);
+ return rv;
+}
+
+struct RPacket0x7942_Repeat
+{
+ uint8_t c;
+};
+struct NetRPacket0x7942_Repeat
+{
+ Byte c;
+};
+static_assert(offsetof(NetRPacket0x7942_Repeat, c) == 0, "offsetof(NetRPacket0x7942_Repeat, c) == 0");
+static_assert(sizeof(NetRPacket0x7942_Repeat) == 1, "sizeof(NetRPacket0x7942_Repeat) == 1");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x7942_Repeat *network, RPacket0x7942_Repeat native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->c, native.c);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x7942_Repeat *native, NetRPacket0x7942_Repeat network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->c, network.c);
+ return rv;
+}
+
+struct SPacket0x7943_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ AccountName account_name;
+};
+struct NetSPacket0x7943_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+ NetString<sizeof(AccountName)> account_name;
+};
+static_assert(offsetof(NetSPacket0x7943_Fixed, packet_id) == 0, "offsetof(NetSPacket0x7943_Fixed, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x7943_Fixed, account_id) == 2, "offsetof(NetSPacket0x7943_Fixed, account_id) == 2");
+static_assert(offsetof(NetSPacket0x7943_Fixed, account_name) == 6, "offsetof(NetSPacket0x7943_Fixed, account_name) == 6");
+static_assert(sizeof(NetSPacket0x7943_Fixed) == 30, "sizeof(NetSPacket0x7943_Fixed) == 30");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x7943_Fixed *network, SPacket0x7943_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x7943_Fixed *native, NetSPacket0x7943_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ return rv;
+}
+
+struct RPacket0x7944_Fixed
+{
+ uint16_t packet_id;
+ AccountName account_name;
+};
+struct NetRPacket0x7944_Fixed
+{
+ Little16 packet_id;
+ NetString<sizeof(AccountName)> account_name;
+};
+static_assert(offsetof(NetRPacket0x7944_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7944_Fixed, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x7944_Fixed, account_name) == 2, "offsetof(NetRPacket0x7944_Fixed, account_name) == 2");
+static_assert(sizeof(NetRPacket0x7944_Fixed) == 26, "sizeof(NetRPacket0x7944_Fixed) == 26");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x7944_Fixed *network, RPacket0x7944_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x7944_Fixed *native, NetRPacket0x7944_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ return rv;
+}
+
+struct SPacket0x7945_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ AccountName account_name;
+};
+struct NetSPacket0x7945_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+ NetString<sizeof(AccountName)> account_name;
+};
+static_assert(offsetof(NetSPacket0x7945_Fixed, packet_id) == 0, "offsetof(NetSPacket0x7945_Fixed, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x7945_Fixed, account_id) == 2, "offsetof(NetSPacket0x7945_Fixed, account_id) == 2");
+static_assert(offsetof(NetSPacket0x7945_Fixed, account_name) == 6, "offsetof(NetSPacket0x7945_Fixed, account_name) == 6");
+static_assert(sizeof(NetSPacket0x7945_Fixed) == 30, "sizeof(NetSPacket0x7945_Fixed) == 30");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x7945_Fixed *network, SPacket0x7945_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x7945_Fixed *native, NetSPacket0x7945_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ return rv;
+}
+
+struct RPacket0x7946_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+};
+struct NetRPacket0x7946_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+};
+static_assert(offsetof(NetRPacket0x7946_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7946_Fixed, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x7946_Fixed, account_id) == 2, "offsetof(NetRPacket0x7946_Fixed, account_id) == 2");
+static_assert(sizeof(NetRPacket0x7946_Fixed) == 6, "sizeof(NetRPacket0x7946_Fixed) == 6");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x7946_Fixed *network, RPacket0x7946_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x7946_Fixed *native, NetRPacket0x7946_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ return rv;
+}
+
+struct SPacket0x7947_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ AccountName account_name;
+};
+struct NetSPacket0x7947_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+ NetString<sizeof(AccountName)> account_name;
+};
+static_assert(offsetof(NetSPacket0x7947_Fixed, packet_id) == 0, "offsetof(NetSPacket0x7947_Fixed, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x7947_Fixed, account_id) == 2, "offsetof(NetSPacket0x7947_Fixed, account_id) == 2");
+static_assert(offsetof(NetSPacket0x7947_Fixed, account_name) == 6, "offsetof(NetSPacket0x7947_Fixed, account_name) == 6");
+static_assert(sizeof(NetSPacket0x7947_Fixed) == 30, "sizeof(NetSPacket0x7947_Fixed) == 30");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x7947_Fixed *network, SPacket0x7947_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x7947_Fixed *native, NetSPacket0x7947_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ return rv;
+}
+
+struct RPacket0x7948_Fixed
+{
+ uint16_t packet_id;
+ AccountName account_name;
+ TimeT valid_until;
+};
+struct NetRPacket0x7948_Fixed
+{
+ Little16 packet_id;
+ NetString<sizeof(AccountName)> account_name;
+ Little32 valid_until;
+};
+static_assert(offsetof(NetRPacket0x7948_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7948_Fixed, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x7948_Fixed, account_name) == 2, "offsetof(NetRPacket0x7948_Fixed, account_name) == 2");
+static_assert(offsetof(NetRPacket0x7948_Fixed, valid_until) == 26, "offsetof(NetRPacket0x7948_Fixed, valid_until) == 26");
+static_assert(sizeof(NetRPacket0x7948_Fixed) == 30, "sizeof(NetRPacket0x7948_Fixed) == 30");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x7948_Fixed *network, RPacket0x7948_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ rv &= native_to_network(&network->valid_until, native.valid_until);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x7948_Fixed *native, NetRPacket0x7948_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ rv &= network_to_native(&native->valid_until, network.valid_until);
+ return rv;
+}
+
+struct SPacket0x7949_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ AccountName account_name;
+ TimeT valid_until;
+};
+struct NetSPacket0x7949_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+ NetString<sizeof(AccountName)> account_name;
+ Little32 valid_until;
+};
+static_assert(offsetof(NetSPacket0x7949_Fixed, packet_id) == 0, "offsetof(NetSPacket0x7949_Fixed, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x7949_Fixed, account_id) == 2, "offsetof(NetSPacket0x7949_Fixed, account_id) == 2");
+static_assert(offsetof(NetSPacket0x7949_Fixed, account_name) == 6, "offsetof(NetSPacket0x7949_Fixed, account_name) == 6");
+static_assert(offsetof(NetSPacket0x7949_Fixed, valid_until) == 30, "offsetof(NetSPacket0x7949_Fixed, valid_until) == 30");
+static_assert(sizeof(NetSPacket0x7949_Fixed) == 34, "sizeof(NetSPacket0x7949_Fixed) == 34");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x7949_Fixed *network, SPacket0x7949_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ rv &= native_to_network(&network->valid_until, native.valid_until);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x7949_Fixed *native, NetSPacket0x7949_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ rv &= network_to_native(&native->valid_until, network.valid_until);
+ return rv;
+}
+
+struct RPacket0x794a_Fixed
+{
+ uint16_t packet_id;
+ AccountName account_name;
+ TimeT ban_until;
+};
+struct NetRPacket0x794a_Fixed
+{
+ Little16 packet_id;
+ NetString<sizeof(AccountName)> account_name;
+ Little32 ban_until;
+};
+static_assert(offsetof(NetRPacket0x794a_Fixed, packet_id) == 0, "offsetof(NetRPacket0x794a_Fixed, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x794a_Fixed, account_name) == 2, "offsetof(NetRPacket0x794a_Fixed, account_name) == 2");
+static_assert(offsetof(NetRPacket0x794a_Fixed, ban_until) == 26, "offsetof(NetRPacket0x794a_Fixed, ban_until) == 26");
+static_assert(sizeof(NetRPacket0x794a_Fixed) == 30, "sizeof(NetRPacket0x794a_Fixed) == 30");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x794a_Fixed *network, RPacket0x794a_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ rv &= native_to_network(&network->ban_until, native.ban_until);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x794a_Fixed *native, NetRPacket0x794a_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ rv &= network_to_native(&native->ban_until, network.ban_until);
+ return rv;
+}
+
+struct SPacket0x794b_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ AccountName account_name;
+ TimeT ban_until;
+};
+struct NetSPacket0x794b_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+ NetString<sizeof(AccountName)> account_name;
+ Little32 ban_until;
+};
+static_assert(offsetof(NetSPacket0x794b_Fixed, packet_id) == 0, "offsetof(NetSPacket0x794b_Fixed, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x794b_Fixed, account_id) == 2, "offsetof(NetSPacket0x794b_Fixed, account_id) == 2");
+static_assert(offsetof(NetSPacket0x794b_Fixed, account_name) == 6, "offsetof(NetSPacket0x794b_Fixed, account_name) == 6");
+static_assert(offsetof(NetSPacket0x794b_Fixed, ban_until) == 30, "offsetof(NetSPacket0x794b_Fixed, ban_until) == 30");
+static_assert(sizeof(NetSPacket0x794b_Fixed) == 34, "sizeof(NetSPacket0x794b_Fixed) == 34");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x794b_Fixed *network, SPacket0x794b_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ rv &= native_to_network(&network->ban_until, native.ban_until);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x794b_Fixed *native, NetSPacket0x794b_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ rv &= network_to_native(&native->ban_until, network.ban_until);
+ return rv;
+}
+
+struct RPacket0x794c_Fixed
+{
+ uint16_t packet_id;
+ AccountName account_name;
+ HumanTimeDiff ban_add;
+};
+struct NetRPacket0x794c_Fixed
+{
+ Little16 packet_id;
+ NetString<sizeof(AccountName)> account_name;
+ NetHumanTimeDiff ban_add;
+};
+static_assert(offsetof(NetRPacket0x794c_Fixed, packet_id) == 0, "offsetof(NetRPacket0x794c_Fixed, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x794c_Fixed, account_name) == 2, "offsetof(NetRPacket0x794c_Fixed, account_name) == 2");
+static_assert(offsetof(NetRPacket0x794c_Fixed, ban_add) == 26, "offsetof(NetRPacket0x794c_Fixed, ban_add) == 26");
+static_assert(sizeof(NetRPacket0x794c_Fixed) == 38, "sizeof(NetRPacket0x794c_Fixed) == 38");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x794c_Fixed *network, RPacket0x794c_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ rv &= native_to_network(&network->ban_add, native.ban_add);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x794c_Fixed *native, NetRPacket0x794c_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ rv &= network_to_native(&native->ban_add, network.ban_add);
+ return rv;
+}
+
+struct SPacket0x794d_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ AccountName account_name;
+ TimeT ban_until;
+};
+struct NetSPacket0x794d_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+ NetString<sizeof(AccountName)> account_name;
+ Little32 ban_until;
+};
+static_assert(offsetof(NetSPacket0x794d_Fixed, packet_id) == 0, "offsetof(NetSPacket0x794d_Fixed, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x794d_Fixed, account_id) == 2, "offsetof(NetSPacket0x794d_Fixed, account_id) == 2");
+static_assert(offsetof(NetSPacket0x794d_Fixed, account_name) == 6, "offsetof(NetSPacket0x794d_Fixed, account_name) == 6");
+static_assert(offsetof(NetSPacket0x794d_Fixed, ban_until) == 30, "offsetof(NetSPacket0x794d_Fixed, ban_until) == 30");
+static_assert(sizeof(NetSPacket0x794d_Fixed) == 34, "sizeof(NetSPacket0x794d_Fixed) == 34");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x794d_Fixed *network, SPacket0x794d_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ rv &= native_to_network(&network->ban_until, native.ban_until);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x794d_Fixed *native, NetSPacket0x794d_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ rv &= network_to_native(&native->ban_until, network.ban_until);
+ return rv;
+}
+
+struct RPacket0x794e_Head
+{
+ uint16_t packet_id;
+ uint16_t unused;
+ uint32_t string_length;
+};
+struct NetRPacket0x794e_Head
+{
+ Little16 packet_id;
+ Little16 unused;
+ Little32 string_length;
+};
+static_assert(offsetof(NetRPacket0x794e_Head, packet_id) == 0, "offsetof(NetRPacket0x794e_Head, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x794e_Head, unused) == 2, "offsetof(NetRPacket0x794e_Head, unused) == 2");
+static_assert(offsetof(NetRPacket0x794e_Head, string_length) == 4, "offsetof(NetRPacket0x794e_Head, string_length) == 4");
+static_assert(sizeof(NetRPacket0x794e_Head) == 8, "sizeof(NetRPacket0x794e_Head) == 8");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x794e_Head *network, RPacket0x794e_Head native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->unused, native.unused);
+ rv &= native_to_network(&network->string_length, native.string_length);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x794e_Head *native, NetRPacket0x794e_Head network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->unused, network.unused);
+ rv &= network_to_native(&native->string_length, network.string_length);
+ return rv;
+}
+
+struct RPacket0x794e_Repeat
+{
+ uint8_t c;
+};
+struct NetRPacket0x794e_Repeat
+{
+ Byte c;
+};
+static_assert(offsetof(NetRPacket0x794e_Repeat, c) == 0, "offsetof(NetRPacket0x794e_Repeat, c) == 0");
+static_assert(sizeof(NetRPacket0x794e_Repeat) == 1, "sizeof(NetRPacket0x794e_Repeat) == 1");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x794e_Repeat *network, RPacket0x794e_Repeat native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->c, native.c);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x794e_Repeat *native, NetRPacket0x794e_Repeat network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->c, network.c);
+ return rv;
+}
+
+struct SPacket0x794f_Fixed
+{
+ uint16_t packet_id;
+ uint16_t error;
+};
+struct NetSPacket0x794f_Fixed
+{
+ Little16 packet_id;
+ Little16 error;
+};
+static_assert(offsetof(NetSPacket0x794f_Fixed, packet_id) == 0, "offsetof(NetSPacket0x794f_Fixed, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x794f_Fixed, error) == 2, "offsetof(NetSPacket0x794f_Fixed, error) == 2");
+static_assert(sizeof(NetSPacket0x794f_Fixed) == 4, "sizeof(NetSPacket0x794f_Fixed) == 4");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x794f_Fixed *network, SPacket0x794f_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->error, native.error);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x794f_Fixed *native, NetSPacket0x794f_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->error, network.error);
+ return rv;
+}
+
+struct RPacket0x7950_Fixed
+{
+ uint16_t packet_id;
+ AccountName account_name;
+ HumanTimeDiff valid_add;
+};
+struct NetRPacket0x7950_Fixed
+{
+ Little16 packet_id;
+ NetString<sizeof(AccountName)> account_name;
+ NetHumanTimeDiff valid_add;
+};
+static_assert(offsetof(NetRPacket0x7950_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7950_Fixed, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x7950_Fixed, account_name) == 2, "offsetof(NetRPacket0x7950_Fixed, account_name) == 2");
+static_assert(offsetof(NetRPacket0x7950_Fixed, valid_add) == 26, "offsetof(NetRPacket0x7950_Fixed, valid_add) == 26");
+static_assert(sizeof(NetRPacket0x7950_Fixed) == 38, "sizeof(NetRPacket0x7950_Fixed) == 38");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x7950_Fixed *network, RPacket0x7950_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ rv &= native_to_network(&network->valid_add, native.valid_add);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x7950_Fixed *native, NetRPacket0x7950_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ rv &= network_to_native(&native->valid_add, network.valid_add);
+ return rv;
+}
+
+struct SPacket0x7951_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ AccountName account_name;
+ TimeT valid_until;
+};
+struct NetSPacket0x7951_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+ NetString<sizeof(AccountName)> account_name;
+ Little32 valid_until;
+};
+static_assert(offsetof(NetSPacket0x7951_Fixed, packet_id) == 0, "offsetof(NetSPacket0x7951_Fixed, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x7951_Fixed, account_id) == 2, "offsetof(NetSPacket0x7951_Fixed, account_id) == 2");
+static_assert(offsetof(NetSPacket0x7951_Fixed, account_name) == 6, "offsetof(NetSPacket0x7951_Fixed, account_name) == 6");
+static_assert(offsetof(NetSPacket0x7951_Fixed, valid_until) == 30, "offsetof(NetSPacket0x7951_Fixed, valid_until) == 30");
+static_assert(sizeof(NetSPacket0x7951_Fixed) == 34, "sizeof(NetSPacket0x7951_Fixed) == 34");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x7951_Fixed *network, SPacket0x7951_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ rv &= native_to_network(&network->valid_until, native.valid_until);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x7951_Fixed *native, NetSPacket0x7951_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ rv &= network_to_native(&native->valid_until, network.valid_until);
+ return rv;
+}
+
+struct RPacket0x7952_Fixed
+{
+ uint16_t packet_id;
+ AccountName account_name;
+};
+struct NetRPacket0x7952_Fixed
+{
+ Little16 packet_id;
+ NetString<sizeof(AccountName)> account_name;
+};
+static_assert(offsetof(NetRPacket0x7952_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7952_Fixed, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x7952_Fixed, account_name) == 2, "offsetof(NetRPacket0x7952_Fixed, account_name) == 2");
+static_assert(sizeof(NetRPacket0x7952_Fixed) == 26, "sizeof(NetRPacket0x7952_Fixed) == 26");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x7952_Fixed *network, RPacket0x7952_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x7952_Fixed *native, NetRPacket0x7952_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ return rv;
+}
+
+struct SPacket0x7953_Head
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ GmLevel gm_level;
+ AccountName account_name;
+ SEX id;
+ uint32_t login_count;
+ uint32_t state;
+ timestamp_seconds_buffer error_message;
+ timestamp_milliseconds_buffer last_login_string;
+ VString<15> ip_string;
+ AccountEmail email;
+ TimeT connect_until;
+ TimeT ban_until;
+ uint16_t string_length;
+};
+struct NetSPacket0x7953_Head
+{
+ Little16 packet_id;
+ Little32 account_id;
+ Byte gm_level;
+ NetString<sizeof(AccountName)> account_name;
+ Byte id;
+ Little32 login_count;
+ Little32 state;
+ NetString<sizeof(timestamp_seconds_buffer)> error_message;
+ NetString<sizeof(timestamp_milliseconds_buffer)> last_login_string;
+ NetString<sizeof(VString<15>)> ip_string;
+ NetString<sizeof(AccountEmail)> email;
+ Little32 connect_until;
+ Little32 ban_until;
+ Little16 string_length;
+};
+static_assert(offsetof(NetSPacket0x7953_Head, packet_id) == 0, "offsetof(NetSPacket0x7953_Head, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x7953_Head, account_id) == 2, "offsetof(NetSPacket0x7953_Head, account_id) == 2");
+static_assert(offsetof(NetSPacket0x7953_Head, gm_level) == 6, "offsetof(NetSPacket0x7953_Head, gm_level) == 6");
+static_assert(offsetof(NetSPacket0x7953_Head, account_name) == 7, "offsetof(NetSPacket0x7953_Head, account_name) == 7");
+static_assert(offsetof(NetSPacket0x7953_Head, id) == 31, "offsetof(NetSPacket0x7953_Head, id) == 31");
+static_assert(offsetof(NetSPacket0x7953_Head, login_count) == 32, "offsetof(NetSPacket0x7953_Head, login_count) == 32");
+static_assert(offsetof(NetSPacket0x7953_Head, state) == 36, "offsetof(NetSPacket0x7953_Head, state) == 36");
+static_assert(offsetof(NetSPacket0x7953_Head, error_message) == 40, "offsetof(NetSPacket0x7953_Head, error_message) == 40");
+static_assert(offsetof(NetSPacket0x7953_Head, last_login_string) == 60, "offsetof(NetSPacket0x7953_Head, last_login_string) == 60");
+static_assert(offsetof(NetSPacket0x7953_Head, ip_string) == 84, "offsetof(NetSPacket0x7953_Head, ip_string) == 84");
+static_assert(offsetof(NetSPacket0x7953_Head, email) == 100, "offsetof(NetSPacket0x7953_Head, email) == 100");
+static_assert(offsetof(NetSPacket0x7953_Head, connect_until) == 140, "offsetof(NetSPacket0x7953_Head, connect_until) == 140");
+static_assert(offsetof(NetSPacket0x7953_Head, ban_until) == 144, "offsetof(NetSPacket0x7953_Head, ban_until) == 144");
+static_assert(offsetof(NetSPacket0x7953_Head, string_length) == 148, "offsetof(NetSPacket0x7953_Head, string_length) == 148");
+static_assert(sizeof(NetSPacket0x7953_Head) == 150, "sizeof(NetSPacket0x7953_Head) == 150");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x7953_Head *network, SPacket0x7953_Head native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->gm_level, native.gm_level);
+ rv &= native_to_network(&network->account_name, native.account_name);
+ rv &= native_to_network(&network->id, native.id);
+ rv &= native_to_network(&network->login_count, native.login_count);
+ rv &= native_to_network(&network->state, native.state);
+ rv &= native_to_network(&network->error_message, native.error_message);
+ rv &= native_to_network(&network->last_login_string, native.last_login_string);
+ rv &= native_to_network(&network->ip_string, native.ip_string);
+ rv &= native_to_network(&network->email, native.email);
+ rv &= native_to_network(&network->connect_until, native.connect_until);
+ rv &= native_to_network(&network->ban_until, native.ban_until);
+ rv &= native_to_network(&network->string_length, native.string_length);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x7953_Head *native, NetSPacket0x7953_Head network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->gm_level, network.gm_level);
+ rv &= network_to_native(&native->account_name, network.account_name);
+ rv &= network_to_native(&native->id, network.id);
+ rv &= network_to_native(&native->login_count, network.login_count);
+ rv &= network_to_native(&native->state, network.state);
+ rv &= network_to_native(&native->error_message, network.error_message);
+ rv &= network_to_native(&native->last_login_string, network.last_login_string);
+ rv &= network_to_native(&native->ip_string, network.ip_string);
+ rv &= network_to_native(&native->email, network.email);
+ rv &= network_to_native(&native->connect_until, network.connect_until);
+ rv &= network_to_native(&native->ban_until, network.ban_until);
+ rv &= network_to_native(&native->string_length, network.string_length);
+ return rv;
+}
+
+struct SPacket0x7953_Repeat
+{
+ uint8_t c;
+};
+struct NetSPacket0x7953_Repeat
+{
+ Byte c;
+};
+static_assert(offsetof(NetSPacket0x7953_Repeat, c) == 0, "offsetof(NetSPacket0x7953_Repeat, c) == 0");
+static_assert(sizeof(NetSPacket0x7953_Repeat) == 1, "sizeof(NetSPacket0x7953_Repeat) == 1");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x7953_Repeat *network, SPacket0x7953_Repeat native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->c, native.c);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x7953_Repeat *native, NetSPacket0x7953_Repeat network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->c, network.c);
+ return rv;
+}
+
+struct RPacket0x7954_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+};
+struct NetRPacket0x7954_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+};
+static_assert(offsetof(NetRPacket0x7954_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7954_Fixed, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x7954_Fixed, account_id) == 2, "offsetof(NetRPacket0x7954_Fixed, account_id) == 2");
+static_assert(sizeof(NetRPacket0x7954_Fixed) == 6, "sizeof(NetRPacket0x7954_Fixed) == 6");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x7954_Fixed *network, RPacket0x7954_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x7954_Fixed *native, NetRPacket0x7954_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ return rv;
+}
+
+struct RPacket0x7955_Fixed
+{
+ uint16_t packet_id;
+};
+struct NetRPacket0x7955_Fixed
+{
+ Little16 packet_id;
+};
+static_assert(offsetof(NetRPacket0x7955_Fixed, packet_id) == 0, "offsetof(NetRPacket0x7955_Fixed, packet_id) == 0");
+static_assert(sizeof(NetRPacket0x7955_Fixed) == 2, "sizeof(NetRPacket0x7955_Fixed) == 2");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x7955_Fixed *network, RPacket0x7955_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x7955_Fixed *native, NetRPacket0x7955_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ return rv;
+}
+
+
+#endif // TMWA_PROTO2_LOGIN_ADMIN_HPP
diff --git a/src/proto2/login-admin_test.cpp b/src/proto2/login-admin_test.cpp
new file mode 100644
index 0000000..5bd9566
--- /dev/null
+++ b/src/proto2/login-admin_test.cpp
@@ -0,0 +1,23 @@
+#include "login-admin.hpp"
+// login-admin_test.cpp - TMWA network protocol: login/admin
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+// This is a generated file, edit tools/protocol.py instead
+
+#include "../poison.hpp"
diff --git a/src/proto2/login-char.hpp b/src/proto2/login-char.hpp
new file mode 100644
index 0000000..a594207
--- /dev/null
+++ b/src/proto2/login-char.hpp
@@ -0,0 +1,941 @@
+#ifndef TMWA_PROTO2_LOGIN_CHAR_HPP
+#define TMWA_PROTO2_LOGIN_CHAR_HPP
+// login-char.hpp - TMWA network protocol: login/char
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+// This is a generated file, edit tools/protocol.py instead
+
+# include "fwd.hpp"
+
+# include "types.hpp"
+
+// This is an internal protocol, and can be changed without notice
+
+struct RPacket0x2709_Fixed
+{
+ uint16_t packet_id;
+};
+struct NetRPacket0x2709_Fixed
+{
+ Little16 packet_id;
+};
+static_assert(offsetof(NetRPacket0x2709_Fixed, packet_id) == 0, "offsetof(NetRPacket0x2709_Fixed, packet_id) == 0");
+static_assert(sizeof(NetRPacket0x2709_Fixed) == 2, "sizeof(NetRPacket0x2709_Fixed) == 2");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x2709_Fixed *network, RPacket0x2709_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x2709_Fixed *native, NetRPacket0x2709_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ return rv;
+}
+
+struct RPacket0x2712_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ uint32_t login_id1;
+ uint32_t login_id2;
+ SEX sex;
+ IP4Address ip;
+};
+struct NetRPacket0x2712_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+ Little32 login_id1;
+ Little32 login_id2;
+ Byte sex;
+ IP4Address ip;
+};
+static_assert(offsetof(NetRPacket0x2712_Fixed, packet_id) == 0, "offsetof(NetRPacket0x2712_Fixed, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x2712_Fixed, account_id) == 2, "offsetof(NetRPacket0x2712_Fixed, account_id) == 2");
+static_assert(offsetof(NetRPacket0x2712_Fixed, login_id1) == 6, "offsetof(NetRPacket0x2712_Fixed, login_id1) == 6");
+static_assert(offsetof(NetRPacket0x2712_Fixed, login_id2) == 10, "offsetof(NetRPacket0x2712_Fixed, login_id2) == 10");
+static_assert(offsetof(NetRPacket0x2712_Fixed, sex) == 14, "offsetof(NetRPacket0x2712_Fixed, sex) == 14");
+static_assert(offsetof(NetRPacket0x2712_Fixed, ip) == 15, "offsetof(NetRPacket0x2712_Fixed, ip) == 15");
+static_assert(sizeof(NetRPacket0x2712_Fixed) == 19, "sizeof(NetRPacket0x2712_Fixed) == 19");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x2712_Fixed *network, RPacket0x2712_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->login_id1, native.login_id1);
+ rv &= native_to_network(&network->login_id2, native.login_id2);
+ rv &= native_to_network(&network->sex, native.sex);
+ rv &= native_to_network(&network->ip, native.ip);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x2712_Fixed *native, NetRPacket0x2712_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->login_id1, network.login_id1);
+ rv &= network_to_native(&native->login_id2, network.login_id2);
+ rv &= network_to_native(&native->sex, network.sex);
+ rv &= network_to_native(&native->ip, network.ip);
+ return rv;
+}
+
+struct SPacket0x2713_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ uint8_t invalid;
+ AccountEmail email;
+ TimeT connect_until;
+};
+struct NetSPacket0x2713_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+ Byte invalid;
+ NetString<sizeof(AccountEmail)> email;
+ Little32 connect_until;
+};
+static_assert(offsetof(NetSPacket0x2713_Fixed, packet_id) == 0, "offsetof(NetSPacket0x2713_Fixed, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x2713_Fixed, account_id) == 2, "offsetof(NetSPacket0x2713_Fixed, account_id) == 2");
+static_assert(offsetof(NetSPacket0x2713_Fixed, invalid) == 6, "offsetof(NetSPacket0x2713_Fixed, invalid) == 6");
+static_assert(offsetof(NetSPacket0x2713_Fixed, email) == 7, "offsetof(NetSPacket0x2713_Fixed, email) == 7");
+static_assert(offsetof(NetSPacket0x2713_Fixed, connect_until) == 47, "offsetof(NetSPacket0x2713_Fixed, connect_until) == 47");
+static_assert(sizeof(NetSPacket0x2713_Fixed) == 51, "sizeof(NetSPacket0x2713_Fixed) == 51");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x2713_Fixed *network, SPacket0x2713_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->invalid, native.invalid);
+ rv &= native_to_network(&network->email, native.email);
+ rv &= native_to_network(&network->connect_until, native.connect_until);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x2713_Fixed *native, NetSPacket0x2713_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->invalid, network.invalid);
+ rv &= network_to_native(&native->email, network.email);
+ rv &= network_to_native(&native->connect_until, network.connect_until);
+ return rv;
+}
+
+struct RPacket0x2714_Fixed
+{
+ uint16_t packet_id;
+ uint32_t users;
+};
+struct NetRPacket0x2714_Fixed
+{
+ Little16 packet_id;
+ Little32 users;
+};
+static_assert(offsetof(NetRPacket0x2714_Fixed, packet_id) == 0, "offsetof(NetRPacket0x2714_Fixed, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x2714_Fixed, users) == 2, "offsetof(NetRPacket0x2714_Fixed, users) == 2");
+static_assert(sizeof(NetRPacket0x2714_Fixed) == 6, "sizeof(NetRPacket0x2714_Fixed) == 6");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x2714_Fixed *network, RPacket0x2714_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->users, native.users);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x2714_Fixed *native, NetRPacket0x2714_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->users, network.users);
+ return rv;
+}
+
+struct RPacket0x2715_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ AccountEmail email;
+};
+struct NetRPacket0x2715_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+ NetString<sizeof(AccountEmail)> email;
+};
+static_assert(offsetof(NetRPacket0x2715_Fixed, packet_id) == 0, "offsetof(NetRPacket0x2715_Fixed, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x2715_Fixed, account_id) == 2, "offsetof(NetRPacket0x2715_Fixed, account_id) == 2");
+static_assert(offsetof(NetRPacket0x2715_Fixed, email) == 6, "offsetof(NetRPacket0x2715_Fixed, email) == 6");
+static_assert(sizeof(NetRPacket0x2715_Fixed) == 46, "sizeof(NetRPacket0x2715_Fixed) == 46");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x2715_Fixed *network, RPacket0x2715_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->email, native.email);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x2715_Fixed *native, NetRPacket0x2715_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->email, network.email);
+ return rv;
+}
+
+struct RPacket0x2716_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+};
+struct NetRPacket0x2716_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+};
+static_assert(offsetof(NetRPacket0x2716_Fixed, packet_id) == 0, "offsetof(NetRPacket0x2716_Fixed, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x2716_Fixed, account_id) == 2, "offsetof(NetRPacket0x2716_Fixed, account_id) == 2");
+static_assert(sizeof(NetRPacket0x2716_Fixed) == 6, "sizeof(NetRPacket0x2716_Fixed) == 6");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x2716_Fixed *network, RPacket0x2716_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x2716_Fixed *native, NetRPacket0x2716_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ return rv;
+}
+
+struct SPacket0x2717_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ AccountEmail email;
+ TimeT connect_until;
+};
+struct NetSPacket0x2717_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+ NetString<sizeof(AccountEmail)> email;
+ Little32 connect_until;
+};
+static_assert(offsetof(NetSPacket0x2717_Fixed, packet_id) == 0, "offsetof(NetSPacket0x2717_Fixed, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x2717_Fixed, account_id) == 2, "offsetof(NetSPacket0x2717_Fixed, account_id) == 2");
+static_assert(offsetof(NetSPacket0x2717_Fixed, email) == 6, "offsetof(NetSPacket0x2717_Fixed, email) == 6");
+static_assert(offsetof(NetSPacket0x2717_Fixed, connect_until) == 46, "offsetof(NetSPacket0x2717_Fixed, connect_until) == 46");
+static_assert(sizeof(NetSPacket0x2717_Fixed) == 50, "sizeof(NetSPacket0x2717_Fixed) == 50");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x2717_Fixed *network, SPacket0x2717_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->email, native.email);
+ rv &= native_to_network(&network->connect_until, native.connect_until);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x2717_Fixed *native, NetSPacket0x2717_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->email, network.email);
+ rv &= network_to_native(&native->connect_until, network.connect_until);
+ return rv;
+}
+
+struct RPacket0x2720_Head
+{
+ uint16_t packet_id;
+ uint16_t packet_length;
+ uint32_t account_id;
+};
+struct NetRPacket0x2720_Head
+{
+ Little16 packet_id;
+ Little16 packet_length;
+ Little32 account_id;
+};
+static_assert(offsetof(NetRPacket0x2720_Head, packet_id) == 0, "offsetof(NetRPacket0x2720_Head, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x2720_Head, packet_length) == 2, "offsetof(NetRPacket0x2720_Head, packet_length) == 2");
+static_assert(offsetof(NetRPacket0x2720_Head, account_id) == 4, "offsetof(NetRPacket0x2720_Head, account_id) == 4");
+static_assert(sizeof(NetRPacket0x2720_Head) == 8, "sizeof(NetRPacket0x2720_Head) == 8");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x2720_Head *network, RPacket0x2720_Head native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->packet_length, native.packet_length);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x2720_Head *native, NetRPacket0x2720_Head network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->packet_length, network.packet_length);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ return rv;
+}
+
+struct RPacket0x2720_Repeat
+{
+ uint8_t c;
+};
+struct NetRPacket0x2720_Repeat
+{
+ Byte c;
+};
+static_assert(offsetof(NetRPacket0x2720_Repeat, c) == 0, "offsetof(NetRPacket0x2720_Repeat, c) == 0");
+static_assert(sizeof(NetRPacket0x2720_Repeat) == 1, "sizeof(NetRPacket0x2720_Repeat) == 1");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x2720_Repeat *network, RPacket0x2720_Repeat native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->c, native.c);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x2720_Repeat *native, NetRPacket0x2720_Repeat network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->c, network.c);
+ return rv;
+}
+
+struct SPacket0x2721_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ GmLevel gm_level;
+};
+struct NetSPacket0x2721_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+ Little32 gm_level;
+};
+static_assert(offsetof(NetSPacket0x2721_Fixed, packet_id) == 0, "offsetof(NetSPacket0x2721_Fixed, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x2721_Fixed, account_id) == 2, "offsetof(NetSPacket0x2721_Fixed, account_id) == 2");
+static_assert(offsetof(NetSPacket0x2721_Fixed, gm_level) == 6, "offsetof(NetSPacket0x2721_Fixed, gm_level) == 6");
+static_assert(sizeof(NetSPacket0x2721_Fixed) == 10, "sizeof(NetSPacket0x2721_Fixed) == 10");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x2721_Fixed *network, SPacket0x2721_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->gm_level, native.gm_level);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x2721_Fixed *native, NetSPacket0x2721_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->gm_level, network.gm_level);
+ return rv;
+}
+
+struct RPacket0x2722_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ AccountEmail old_email;
+ AccountEmail new_email;
+};
+struct NetRPacket0x2722_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+ NetString<sizeof(AccountEmail)> old_email;
+ NetString<sizeof(AccountEmail)> new_email;
+};
+static_assert(offsetof(NetRPacket0x2722_Fixed, packet_id) == 0, "offsetof(NetRPacket0x2722_Fixed, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x2722_Fixed, account_id) == 2, "offsetof(NetRPacket0x2722_Fixed, account_id) == 2");
+static_assert(offsetof(NetRPacket0x2722_Fixed, old_email) == 6, "offsetof(NetRPacket0x2722_Fixed, old_email) == 6");
+static_assert(offsetof(NetRPacket0x2722_Fixed, new_email) == 46, "offsetof(NetRPacket0x2722_Fixed, new_email) == 46");
+static_assert(sizeof(NetRPacket0x2722_Fixed) == 86, "sizeof(NetRPacket0x2722_Fixed) == 86");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x2722_Fixed *network, RPacket0x2722_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->old_email, native.old_email);
+ rv &= native_to_network(&network->new_email, native.new_email);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x2722_Fixed *native, NetRPacket0x2722_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->old_email, network.old_email);
+ rv &= network_to_native(&native->new_email, network.new_email);
+ return rv;
+}
+
+struct SPacket0x2723_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ SEX sex;
+};
+struct NetSPacket0x2723_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+ Byte sex;
+};
+static_assert(offsetof(NetSPacket0x2723_Fixed, packet_id) == 0, "offsetof(NetSPacket0x2723_Fixed, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x2723_Fixed, account_id) == 2, "offsetof(NetSPacket0x2723_Fixed, account_id) == 2");
+static_assert(offsetof(NetSPacket0x2723_Fixed, sex) == 6, "offsetof(NetSPacket0x2723_Fixed, sex) == 6");
+static_assert(sizeof(NetSPacket0x2723_Fixed) == 7, "sizeof(NetSPacket0x2723_Fixed) == 7");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x2723_Fixed *network, SPacket0x2723_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->sex, native.sex);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x2723_Fixed *native, NetSPacket0x2723_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->sex, network.sex);
+ return rv;
+}
+
+struct RPacket0x2724_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ uint32_t status;
+};
+struct NetRPacket0x2724_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+ Little32 status;
+};
+static_assert(offsetof(NetRPacket0x2724_Fixed, packet_id) == 0, "offsetof(NetRPacket0x2724_Fixed, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x2724_Fixed, account_id) == 2, "offsetof(NetRPacket0x2724_Fixed, account_id) == 2");
+static_assert(offsetof(NetRPacket0x2724_Fixed, status) == 6, "offsetof(NetRPacket0x2724_Fixed, status) == 6");
+static_assert(sizeof(NetRPacket0x2724_Fixed) == 10, "sizeof(NetRPacket0x2724_Fixed) == 10");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x2724_Fixed *network, RPacket0x2724_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->status, native.status);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x2724_Fixed *native, NetRPacket0x2724_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->status, network.status);
+ return rv;
+}
+
+struct RPacket0x2725_Head
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ HumanTimeDiff deltas;
+};
+struct NetRPacket0x2725_Head
+{
+ Little16 packet_id;
+ Little32 account_id;
+ NetHumanTimeDiff deltas;
+};
+static_assert(offsetof(NetRPacket0x2725_Head, packet_id) == 0, "offsetof(NetRPacket0x2725_Head, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x2725_Head, account_id) == 2, "offsetof(NetRPacket0x2725_Head, account_id) == 2");
+static_assert(offsetof(NetRPacket0x2725_Head, deltas) == 6, "offsetof(NetRPacket0x2725_Head, deltas) == 6");
+static_assert(sizeof(NetRPacket0x2725_Head) == 18, "sizeof(NetRPacket0x2725_Head) == 18");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x2725_Head *network, RPacket0x2725_Head native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->deltas, native.deltas);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x2725_Head *native, NetRPacket0x2725_Head network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->deltas, network.deltas);
+ return rv;
+}
+
+struct RPacket0x2725_Repeat
+{
+ uint8_t c;
+};
+struct NetRPacket0x2725_Repeat
+{
+ Byte c;
+};
+static_assert(offsetof(NetRPacket0x2725_Repeat, c) == 0, "offsetof(NetRPacket0x2725_Repeat, c) == 0");
+static_assert(sizeof(NetRPacket0x2725_Repeat) == 1, "sizeof(NetRPacket0x2725_Repeat) == 1");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x2725_Repeat *network, RPacket0x2725_Repeat native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->c, native.c);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x2725_Repeat *native, NetRPacket0x2725_Repeat network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->c, network.c);
+ return rv;
+}
+
+struct RPacket0x2727_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+};
+struct NetRPacket0x2727_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+};
+static_assert(offsetof(NetRPacket0x2727_Fixed, packet_id) == 0, "offsetof(NetRPacket0x2727_Fixed, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x2727_Fixed, account_id) == 2, "offsetof(NetRPacket0x2727_Fixed, account_id) == 2");
+static_assert(sizeof(NetRPacket0x2727_Fixed) == 6, "sizeof(NetRPacket0x2727_Fixed) == 6");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x2727_Fixed *network, RPacket0x2727_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x2727_Fixed *native, NetRPacket0x2727_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ return rv;
+}
+
+struct RPacket0x2728_Head
+{
+ uint16_t packet_id;
+ uint16_t packet_length;
+ uint32_t account_id;
+};
+struct NetRPacket0x2728_Head
+{
+ Little16 packet_id;
+ Little16 packet_length;
+ Little32 account_id;
+};
+static_assert(offsetof(NetRPacket0x2728_Head, packet_id) == 0, "offsetof(NetRPacket0x2728_Head, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x2728_Head, packet_length) == 2, "offsetof(NetRPacket0x2728_Head, packet_length) == 2");
+static_assert(offsetof(NetRPacket0x2728_Head, account_id) == 4, "offsetof(NetRPacket0x2728_Head, account_id) == 4");
+static_assert(sizeof(NetRPacket0x2728_Head) == 8, "sizeof(NetRPacket0x2728_Head) == 8");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x2728_Head *network, RPacket0x2728_Head native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->packet_length, native.packet_length);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x2728_Head *native, NetRPacket0x2728_Head network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->packet_length, network.packet_length);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ return rv;
+}
+
+struct RPacket0x2728_Repeat
+{
+ VarName name;
+ uint32_t value;
+};
+struct NetRPacket0x2728_Repeat
+{
+ NetString<sizeof(VarName)> name;
+ Little32 value;
+};
+static_assert(offsetof(NetRPacket0x2728_Repeat, name) == 0, "offsetof(NetRPacket0x2728_Repeat, name) == 0");
+static_assert(offsetof(NetRPacket0x2728_Repeat, value) == 32, "offsetof(NetRPacket0x2728_Repeat, value) == 32");
+static_assert(sizeof(NetRPacket0x2728_Repeat) == 36, "sizeof(NetRPacket0x2728_Repeat) == 36");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x2728_Repeat *network, RPacket0x2728_Repeat native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->name, native.name);
+ rv &= native_to_network(&network->value, native.value);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x2728_Repeat *native, NetRPacket0x2728_Repeat network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->name, network.name);
+ rv &= network_to_native(&native->value, network.value);
+ return rv;
+}
+
+struct SPacket0x2729_Head
+{
+ uint16_t packet_id;
+ uint16_t packet_length;
+ uint32_t account_id;
+};
+struct NetSPacket0x2729_Head
+{
+ Little16 packet_id;
+ Little16 packet_length;
+ Little32 account_id;
+};
+static_assert(offsetof(NetSPacket0x2729_Head, packet_id) == 0, "offsetof(NetSPacket0x2729_Head, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x2729_Head, packet_length) == 2, "offsetof(NetSPacket0x2729_Head, packet_length) == 2");
+static_assert(offsetof(NetSPacket0x2729_Head, account_id) == 4, "offsetof(NetSPacket0x2729_Head, account_id) == 4");
+static_assert(sizeof(NetSPacket0x2729_Head) == 8, "sizeof(NetSPacket0x2729_Head) == 8");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x2729_Head *network, SPacket0x2729_Head native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->packet_length, native.packet_length);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x2729_Head *native, NetSPacket0x2729_Head network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->packet_length, network.packet_length);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ return rv;
+}
+
+struct SPacket0x2729_Repeat
+{
+ VarName name;
+ uint32_t value;
+};
+struct NetSPacket0x2729_Repeat
+{
+ NetString<sizeof(VarName)> name;
+ Little32 value;
+};
+static_assert(offsetof(NetSPacket0x2729_Repeat, name) == 0, "offsetof(NetSPacket0x2729_Repeat, name) == 0");
+static_assert(offsetof(NetSPacket0x2729_Repeat, value) == 32, "offsetof(NetSPacket0x2729_Repeat, value) == 32");
+static_assert(sizeof(NetSPacket0x2729_Repeat) == 36, "sizeof(NetSPacket0x2729_Repeat) == 36");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x2729_Repeat *network, SPacket0x2729_Repeat native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->name, native.name);
+ rv &= native_to_network(&network->value, native.value);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x2729_Repeat *native, NetSPacket0x2729_Repeat network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->name, network.name);
+ rv &= network_to_native(&native->value, network.value);
+ return rv;
+}
+
+struct RPacket0x272a_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+};
+struct NetRPacket0x272a_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+};
+static_assert(offsetof(NetRPacket0x272a_Fixed, packet_id) == 0, "offsetof(NetRPacket0x272a_Fixed, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x272a_Fixed, account_id) == 2, "offsetof(NetRPacket0x272a_Fixed, account_id) == 2");
+static_assert(sizeof(NetRPacket0x272a_Fixed) == 6, "sizeof(NetRPacket0x272a_Fixed) == 6");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x272a_Fixed *network, RPacket0x272a_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x272a_Fixed *native, NetRPacket0x272a_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ return rv;
+}
+
+struct SPacket0x2730_Fixed
+{
+ uint16_t packet_id;
+};
+struct NetSPacket0x2730_Fixed
+{
+ Little16 packet_id;
+};
+static_assert(offsetof(NetSPacket0x2730_Fixed, packet_id) == 0, "offsetof(NetSPacket0x2730_Fixed, packet_id) == 0");
+static_assert(sizeof(NetSPacket0x2730_Fixed) == 2, "sizeof(NetSPacket0x2730_Fixed) == 2");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x2730_Fixed *network, SPacket0x2730_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x2730_Fixed *native, NetSPacket0x2730_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ return rv;
+}
+
+struct SPacket0x2731_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ uint8_t ban_not_status;
+ TimeT status_or_ban_until;
+};
+struct NetSPacket0x2731_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+ Byte ban_not_status;
+ Little32 status_or_ban_until;
+};
+static_assert(offsetof(NetSPacket0x2731_Fixed, packet_id) == 0, "offsetof(NetSPacket0x2731_Fixed, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x2731_Fixed, account_id) == 2, "offsetof(NetSPacket0x2731_Fixed, account_id) == 2");
+static_assert(offsetof(NetSPacket0x2731_Fixed, ban_not_status) == 6, "offsetof(NetSPacket0x2731_Fixed, ban_not_status) == 6");
+static_assert(offsetof(NetSPacket0x2731_Fixed, status_or_ban_until) == 7, "offsetof(NetSPacket0x2731_Fixed, status_or_ban_until) == 7");
+static_assert(sizeof(NetSPacket0x2731_Fixed) == 11, "sizeof(NetSPacket0x2731_Fixed) == 11");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x2731_Fixed *network, SPacket0x2731_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->ban_not_status, native.ban_not_status);
+ rv &= native_to_network(&network->status_or_ban_until, native.status_or_ban_until);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x2731_Fixed *native, NetSPacket0x2731_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->ban_not_status, network.ban_not_status);
+ rv &= network_to_native(&native->status_or_ban_until, network.status_or_ban_until);
+ return rv;
+}
+
+struct SPacket0x2732_Head
+{
+ uint16_t packet_id;
+ uint16_t packet_length;
+};
+struct NetSPacket0x2732_Head
+{
+ Little16 packet_id;
+ Little16 packet_length;
+};
+static_assert(offsetof(NetSPacket0x2732_Head, packet_id) == 0, "offsetof(NetSPacket0x2732_Head, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x2732_Head, packet_length) == 2, "offsetof(NetSPacket0x2732_Head, packet_length) == 2");
+static_assert(sizeof(NetSPacket0x2732_Head) == 4, "sizeof(NetSPacket0x2732_Head) == 4");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x2732_Head *network, SPacket0x2732_Head native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->packet_length, native.packet_length);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x2732_Head *native, NetSPacket0x2732_Head network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->packet_length, network.packet_length);
+ return rv;
+}
+
+struct SPacket0x2732_Repeat
+{
+ uint32_t account_id;
+ GmLevel gm_level;
+};
+struct NetSPacket0x2732_Repeat
+{
+ Little32 account_id;
+ Byte gm_level;
+};
+static_assert(offsetof(NetSPacket0x2732_Repeat, account_id) == 0, "offsetof(NetSPacket0x2732_Repeat, account_id) == 0");
+static_assert(offsetof(NetSPacket0x2732_Repeat, gm_level) == 4, "offsetof(NetSPacket0x2732_Repeat, gm_level) == 4");
+static_assert(sizeof(NetSPacket0x2732_Repeat) == 5, "sizeof(NetSPacket0x2732_Repeat) == 5");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x2732_Repeat *network, SPacket0x2732_Repeat native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->gm_level, native.gm_level);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x2732_Repeat *native, NetSPacket0x2732_Repeat network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->gm_level, network.gm_level);
+ return rv;
+}
+
+struct RPacket0x2740_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ AccountPass old_pass;
+ AccountPass new_pass;
+};
+struct NetRPacket0x2740_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+ NetString<sizeof(AccountPass)> old_pass;
+ NetString<sizeof(AccountPass)> new_pass;
+};
+static_assert(offsetof(NetRPacket0x2740_Fixed, packet_id) == 0, "offsetof(NetRPacket0x2740_Fixed, packet_id) == 0");
+static_assert(offsetof(NetRPacket0x2740_Fixed, account_id) == 2, "offsetof(NetRPacket0x2740_Fixed, account_id) == 2");
+static_assert(offsetof(NetRPacket0x2740_Fixed, old_pass) == 6, "offsetof(NetRPacket0x2740_Fixed, old_pass) == 6");
+static_assert(offsetof(NetRPacket0x2740_Fixed, new_pass) == 30, "offsetof(NetRPacket0x2740_Fixed, new_pass) == 30");
+static_assert(sizeof(NetRPacket0x2740_Fixed) == 54, "sizeof(NetRPacket0x2740_Fixed) == 54");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetRPacket0x2740_Fixed *network, RPacket0x2740_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->old_pass, native.old_pass);
+ rv &= native_to_network(&network->new_pass, native.new_pass);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(RPacket0x2740_Fixed *native, NetRPacket0x2740_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->old_pass, network.old_pass);
+ rv &= network_to_native(&native->new_pass, network.new_pass);
+ return rv;
+}
+
+struct SPacket0x2741_Fixed
+{
+ uint16_t packet_id;
+ uint32_t account_id;
+ uint8_t status;
+};
+struct NetSPacket0x2741_Fixed
+{
+ Little16 packet_id;
+ Little32 account_id;
+ Byte status;
+};
+static_assert(offsetof(NetSPacket0x2741_Fixed, packet_id) == 0, "offsetof(NetSPacket0x2741_Fixed, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x2741_Fixed, account_id) == 2, "offsetof(NetSPacket0x2741_Fixed, account_id) == 2");
+static_assert(offsetof(NetSPacket0x2741_Fixed, status) == 6, "offsetof(NetSPacket0x2741_Fixed, status) == 6");
+static_assert(sizeof(NetSPacket0x2741_Fixed) == 7, "sizeof(NetSPacket0x2741_Fixed) == 7");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x2741_Fixed *network, SPacket0x2741_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->account_id, native.account_id);
+ rv &= native_to_network(&network->status, native.status);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x2741_Fixed *native, NetSPacket0x2741_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->account_id, network.account_id);
+ rv &= network_to_native(&native->status, network.status);
+ return rv;
+}
+
+
+#endif // TMWA_PROTO2_LOGIN_CHAR_HPP
diff --git a/src/proto2/login-char_test.cpp b/src/proto2/login-char_test.cpp
new file mode 100644
index 0000000..9ae0f5a
--- /dev/null
+++ b/src/proto2/login-char_test.cpp
@@ -0,0 +1,23 @@
+#include "login-char.hpp"
+// login-char_test.cpp - TMWA network protocol: login/char
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+// This is a generated file, edit tools/protocol.py instead
+
+#include "../poison.hpp"
diff --git a/src/proto2/login-user.hpp b/src/proto2/login-user.hpp
new file mode 100644
index 0000000..4c71e8a
--- /dev/null
+++ b/src/proto2/login-user.hpp
@@ -0,0 +1,31 @@
+#ifndef TMWA_PROTO2_LOGIN_USER_HPP
+#define TMWA_PROTO2_LOGIN_USER_HPP
+// login-user.hpp - TMWA network protocol: login/user
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+// This is a generated file, edit tools/protocol.py instead
+
+# include "fwd.hpp"
+
+# include "types.hpp"
+
+// This is a public protocol, and changes require client cooperation
+
+
+#endif // TMWA_PROTO2_LOGIN_USER_HPP
diff --git a/src/proto2/login-user_test.cpp b/src/proto2/login-user_test.cpp
new file mode 100644
index 0000000..3b623b6
--- /dev/null
+++ b/src/proto2/login-user_test.cpp
@@ -0,0 +1,23 @@
+#include "login-user.hpp"
+// login-user_test.cpp - TMWA network protocol: login/user
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+// This is a generated file, edit tools/protocol.py instead
+
+#include "../poison.hpp"
diff --git a/src/proto2/map-user.hpp b/src/proto2/map-user.hpp
new file mode 100644
index 0000000..da59c40
--- /dev/null
+++ b/src/proto2/map-user.hpp
@@ -0,0 +1,81 @@
+#ifndef TMWA_PROTO2_MAP_USER_HPP
+#define TMWA_PROTO2_MAP_USER_HPP
+// map-user.hpp - TMWA network protocol: map/user
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+// This is a generated file, edit tools/protocol.py instead
+
+# include "fwd.hpp"
+
+# include "types.hpp"
+
+// This is a public protocol, and changes require client cooperation
+
+struct SPacket0x0212_Fixed
+{
+ uint16_t packet_id;
+ BlockId npc_id;
+ uint16_t command;
+ BlockId id;
+ uint16_t x;
+ uint16_t y;
+};
+struct NetSPacket0x0212_Fixed
+{
+ Little16 packet_id;
+ Little32 npc_id;
+ Little16 command;
+ Little32 id;
+ Little16 x;
+ Little16 y;
+};
+static_assert(offsetof(NetSPacket0x0212_Fixed, packet_id) == 0, "offsetof(NetSPacket0x0212_Fixed, packet_id) == 0");
+static_assert(offsetof(NetSPacket0x0212_Fixed, npc_id) == 2, "offsetof(NetSPacket0x0212_Fixed, npc_id) == 2");
+static_assert(offsetof(NetSPacket0x0212_Fixed, command) == 6, "offsetof(NetSPacket0x0212_Fixed, command) == 6");
+static_assert(offsetof(NetSPacket0x0212_Fixed, id) == 8, "offsetof(NetSPacket0x0212_Fixed, id) == 8");
+static_assert(offsetof(NetSPacket0x0212_Fixed, x) == 12, "offsetof(NetSPacket0x0212_Fixed, x) == 12");
+static_assert(offsetof(NetSPacket0x0212_Fixed, y) == 14, "offsetof(NetSPacket0x0212_Fixed, y) == 14");
+static_assert(sizeof(NetSPacket0x0212_Fixed) == 16, "sizeof(NetSPacket0x0212_Fixed) == 16");
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetSPacket0x0212_Fixed *network, SPacket0x0212_Fixed native)
+{
+ bool rv = true;
+ rv &= native_to_network(&network->packet_id, native.packet_id);
+ rv &= native_to_network(&network->npc_id, native.npc_id);
+ rv &= native_to_network(&network->command, native.command);
+ rv &= native_to_network(&network->id, native.id);
+ rv &= native_to_network(&network->x, native.x);
+ rv &= native_to_network(&network->y, native.y);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SPacket0x0212_Fixed *native, NetSPacket0x0212_Fixed network)
+{
+ bool rv = true;
+ rv &= network_to_native(&native->packet_id, network.packet_id);
+ rv &= network_to_native(&native->npc_id, network.npc_id);
+ rv &= network_to_native(&native->command, network.command);
+ rv &= network_to_native(&native->id, network.id);
+ rv &= network_to_native(&native->x, network.x);
+ rv &= network_to_native(&native->y, network.y);
+ return rv;
+}
+
+
+#endif // TMWA_PROTO2_MAP_USER_HPP
diff --git a/src/proto2/map-user_test.cpp b/src/proto2/map-user_test.cpp
new file mode 100644
index 0000000..adbdf6f
--- /dev/null
+++ b/src/proto2/map-user_test.cpp
@@ -0,0 +1,23 @@
+#include "map-user.hpp"
+// map-user_test.cpp - TMWA network protocol: map/user
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+// This is a generated file, edit tools/protocol.py instead
+
+#include "../poison.hpp"
diff --git a/src/proto2/types.hpp b/src/proto2/types.hpp
new file mode 100644
index 0000000..f69d943
--- /dev/null
+++ b/src/proto2/types.hpp
@@ -0,0 +1,264 @@
+#ifndef TMWA_PROTO2_TYPES_HPP
+#define TMWA_PROTO2_TYPES_HPP
+// proto2/types.hpp - Forward declarations of packet component types
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# include "fwd.hpp"
+
+//TODO split the includes
+# include <cstdint>
+# include "../ints/little.hpp"
+# include "../strings/vstring.hpp"
+# include "../net/ip.hpp"
+# include "../mmo/enums.hpp"
+# include "../mmo/human_time_diff.hpp"
+# include "../mmo/ids.hpp"
+# include "../mmo/strs.hpp"
+# include "../mmo/utils.hpp"
+# include "../mmo/version.hpp"
+template <class T>
+bool native_to_network(T *network, T native)
+{
+ *network = native;
+ return true;
+}
+template <class T>
+bool network_to_native(T *native, T network)
+{
+ *native = network;
+ return true;
+}
+template <size_t N>
+struct NetString
+{
+ char data[N];
+};
+template <size_t N>
+bool native_to_network(NetString<N> *network, VString<N-1> native)
+{
+ // basically WBUF_STRING
+ char *const begin = network->data;
+ char *const end = begin + N;
+ char *const mid = std::copy(native.begin(), native.end(), begin);
+ std::fill(mid, end, '\0');
+ return true;
+}
+template <size_t N>
+bool network_to_native(VString<N-1> *native, NetString<N> network)
+{
+ // basically RBUF_STRING
+ const char *const begin = network.data;
+ const char *const end = begin + N;
+ const char *const mid = std::find(begin, end, '\0');
+ *native = XString(begin, mid, nullptr);
+ return true;
+}
+
+inline __attribute__((warn_unused_result))
+bool native_to_network(Byte *network, SEX native)
+{
+ bool rv = true;
+ uint8_t tmp = static_cast<uint8_t>(native);
+ rv &= native_to_network(network, tmp);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(SEX *native, Byte network)
+{
+ bool rv = true;
+ uint8_t tmp;
+ rv &= network_to_native(&tmp, network);
+ *native = static_cast<SEX>(tmp);
+ // TODO this is what really should be doing a checked cast
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool native_to_network(Little16 *network, Species native)
+{
+ bool rv = true;
+ uint16_t tmp = unwrap<Species>(native);
+ rv &= native_to_network(network, tmp);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(Species *native, Little16 network)
+{
+ bool rv = true;
+ uint16_t tmp;
+ rv &= network_to_native(&tmp, network);
+ *native = wrap<Species>(tmp);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool native_to_network(Little32 *network, AccountId native)
+{
+ bool rv = true;
+ uint32_t tmp = unwrap<AccountId>(native);
+ rv &= native_to_network(network, tmp);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(AccountId *native, Little32 network)
+{
+ bool rv = true;
+ uint32_t tmp;
+ rv &= network_to_native(&tmp, network);
+ *native = wrap<AccountId>(tmp);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool native_to_network(Little32 *network, CharId native)
+{
+ bool rv = true;
+ uint32_t tmp = unwrap<CharId>(native);
+ rv &= native_to_network(network, tmp);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(CharId *native, Little32 network)
+{
+ bool rv = true;
+ uint32_t tmp;
+ rv &= network_to_native(&tmp, network);
+ *native = wrap<CharId>(tmp);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool native_to_network(Little32 *network, PartyId native)
+{
+ bool rv = true;
+ uint32_t tmp = unwrap<PartyId>(native);
+ rv &= native_to_network(network, tmp);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(PartyId *native, Little32 network)
+{
+ bool rv = true;
+ uint32_t tmp;
+ rv &= network_to_native(&tmp, network);
+ *native = wrap<PartyId>(tmp);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool native_to_network(Little16 *network, ItemNameId native)
+{
+ bool rv = true;
+ uint16_t tmp = unwrap<ItemNameId>(native);
+ rv &= native_to_network(network, tmp);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(ItemNameId *native, Little16 network)
+{
+ bool rv = true;
+ uint16_t tmp;
+ rv &= network_to_native(&tmp, network);
+ *native = wrap<ItemNameId>(tmp);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool native_to_network(Little32 *network, BlockId native)
+{
+ bool rv = true;
+ uint32_t tmp = unwrap<BlockId>(native);
+ rv &= native_to_network(network, tmp);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(BlockId *native, Little32 network)
+{
+ bool rv = true;
+ uint32_t tmp;
+ rv &= network_to_native(&tmp, network);
+ *native = wrap<BlockId>(tmp);
+ return rv;
+}
+struct NetHumanTimeDiff
+{
+ Little16 year;
+ Little16 month;
+ Little16 day;
+ Little16 hour;
+ Little16 minute;
+ Little16 second;
+};
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetHumanTimeDiff *network, HumanTimeDiff native)
+{
+ bool rv = true;
+ uint16_t year = native.year; rv &= native_to_network(&network->year, year);
+ uint16_t month = native.month; rv &= native_to_network(&network->month, month);
+ uint16_t day = native.day; rv &= native_to_network(&network->day, day);
+ uint16_t hour = native.hour; rv &= native_to_network(&network->hour, hour);
+ uint16_t minute = native.minute; rv &= native_to_network(&network->minute, minute);
+ uint16_t second = native.second; rv &= native_to_network(&network->second, second);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(HumanTimeDiff *native, NetHumanTimeDiff network)
+{
+ bool rv = true;
+ uint16_t year; rv &= network_to_native(&year, network.year); native->year = year;
+ uint16_t month; rv &= network_to_native(&month, network.month); native->month = month;
+ uint16_t day; rv &= network_to_native(&day, network.day); native->day = day;
+ uint16_t hour; rv &= network_to_native(&hour, network.hour); native->hour = hour;
+ uint16_t minute; rv &= network_to_native(&minute, network.minute); native->minute = minute;
+ uint16_t second; rv &= network_to_native(&second, network.second); native->second = second;
+ return rv;
+}
+
+struct NetVersion
+{
+ Byte major;
+ Byte minor;
+ Byte patch;
+ Byte devel;
+ Byte flags;
+ Byte which;
+ Little16 vend;
+};
+inline __attribute__((warn_unused_result))
+bool native_to_network(NetVersion *network, Version native)
+{
+ bool rv = true;
+ uint8_t major = native.major; rv &= native_to_network(&network->major, major);
+ uint8_t minor = native.minor; rv &= native_to_network(&network->minor, minor);
+ uint8_t patch = native.patch; rv &= native_to_network(&network->patch, patch);
+ uint8_t devel = native.devel; rv &= native_to_network(&network->devel, devel);
+ uint8_t flags = native.flags; rv &= native_to_network(&network->flags, flags);
+ uint8_t which = native.which; rv &= native_to_network(&network->which, which);
+ uint16_t vend = native.vend; rv &= native_to_network(&network->vend, vend);
+ return rv;
+}
+inline __attribute__((warn_unused_result))
+bool network_to_native(Version *native, NetVersion network)
+{
+ bool rv = true;
+ uint8_t major; rv &= network_to_native(&major, network.major); native->major = major;
+ uint8_t minor; rv &= network_to_native(&minor, network.minor); native->minor = minor;
+ uint8_t patch; rv &= network_to_native(&patch, network.patch); native->patch = patch;
+ uint8_t devel; rv &= network_to_native(&devel, network.devel); native->devel = devel;
+ uint8_t flags; rv &= network_to_native(&flags, network.flags); native->flags = flags;
+ uint8_t which; rv &= network_to_native(&which, network.which); native->which = which;
+ uint16_t vend; rv &= network_to_native(&vend, network.vend); native->vend = vend;
+ return rv;
+}
+
+#endif // TMWA_PROTO2_TYPES_HPP