summaryrefslogtreecommitdiff
path: root/context.h
diff options
context:
space:
mode:
Diffstat (limited to 'context.h')
-rw-r--r--context.h29
1 files changed, 27 insertions, 2 deletions
diff --git a/context.h b/context.h
index 2baecea..e82c1da 100644
--- a/context.h
+++ b/context.h
@@ -517,6 +517,8 @@ extern TTcpSocket *tcp_socket_table[16];
// pso/TProtocol.h
EXTERN_OBJECT_NAME(TProtocol);
+extern u32 new_ip_addr;
+extern u16 new_port;
extern TPlyMeetUserExtension meet_user_settings;
extern u32 game_variations[16][2];
@@ -1072,7 +1074,7 @@ public:
TSocket(TObject *parent);
virtual ~TSocket();
- virtual short open() = 0;
+ virtual int open() = 0;
virtual short close() = 0;
virtual void recv() = 0;
virtual short send(u8 *data) = 0;
@@ -1098,7 +1100,7 @@ public:
virtual ~TTcpSocket();
- virtual short open();
+ virtual int open();
virtual short close();
virtual void recv();
virtual short send(u8 *data);
@@ -1170,6 +1172,19 @@ public:
};
// pso/packet_classes.h
+class TRecvPort {
+public:
+ packet_header header;
+ u32 ip_addr;
+ short port;
+public:
+ void bswap() {
+ header.bswap();
+ bswap_32(&ip_addr);
+ bswap_16(as(u16 *, &port));
+ };
+};
+
class TPlyMeetUserExtension {
public:
TPlyGuildCardTag tags[8];
@@ -1394,6 +1409,7 @@ public:
void some_stub();
int handle_command(struct packet *pkt);
void parse_packet();
+ void seq_jump(u8 *some_struct, TPlyMeetUserExtension &extension);
// Command handlers.
// 0x01
@@ -1436,4 +1452,13 @@ public:
void recv_upload(packet &pkt);
// 0x11
void recv_message(packet &pkt);
+ // 0x19
+ void recv_port(packet &pkt);
+ // 0x1B
+ void recv_battle_data(packet &pkt);
+ // 0x1C
+ void recv_system_file(packet &pkt);
+
+ // Send command handlers.
+ int send_login3();
};