summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/login/lclif.c12
-rw-r--r--src/login/lclif.p.h14
2 files changed, 25 insertions, 1 deletions
diff --git a/src/login/lclif.c b/src/login/lclif.c
index b9ad7372f..f391c5bd7 100644
--- a/src/login/lclif.c
+++ b/src/login/lclif.c
@@ -233,6 +233,14 @@ static enum parsefunc_rcode lclif_parse_CA_ACK_MOBILE_OTP(int fd, struct login_s
return PACKET_VALID;
}
+/// @copydoc lclif_interface_private::parse_CA_OTP_CODE()
+static enum parsefunc_rcode lclif_parse_CA_OTP_CODE(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
+static enum parsefunc_rcode lclif_parse_CA_OTP_CODE(int fd, struct login_session_data *sd)
+{
+ // TODO: parsing packet data
+ return PACKET_VALID;
+}
+
/// @copydoc lclif_interface_private::parse_CA_REQ_HASH()
static enum parsefunc_rcode lclif_parse_CA_REQ_HASH(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
static enum parsefunc_rcode lclif_parse_CA_REQ_HASH(int fd, struct login_session_data *sd)
@@ -526,6 +534,9 @@ static void packetdb_loaddb(void)
#if PACKETVER_MAIN_NUM >= 20181114 || PACKETVER_RE_NUM >= 20181114
packet_def(CA_ACK_MOBILE_OTP),
#endif
+#if PACKETVER_MAIN_NUM >= 20181114 || PACKETVER_RE_NUM >= 20181114 || defined(PACKETVER_ZERO)
+ packet_def(CA_OTP_CODE),
+#endif
packet_def(CA_REQ_HASH),
#undef packet_def
#undef packet_def2
@@ -591,6 +602,7 @@ void lclif_defaults(void)
lclif->p->parse_CA_SSO_LOGIN_REQ = lclif_parse_CA_SSO_LOGIN_REQ;
lclif->p->parse_CA_LOGIN_OTP = lclif_parse_CA_LOGIN_OTP;
lclif->p->parse_CA_ACK_MOBILE_OTP = lclif_parse_CA_ACK_MOBILE_OTP;
+ lclif->p->parse_CA_OTP_CODE = lclif_parse_CA_OTP_CODE;
lclif->p->parse_CA_REQ_HASH = lclif_parse_CA_REQ_HASH;
lclif->p->parse_CA_CHARSERVERCONNECT = lclif_parse_CA_CHARSERVERCONNECT;
}
diff --git a/src/login/lclif.p.h b/src/login/lclif.p.h
index 21fc2048a..815552eab 100644
--- a/src/login/lclif.p.h
+++ b/src/login/lclif.p.h
@@ -170,7 +170,7 @@ struct packet_CA_SSO_LOGIN_REQ {
* Variable-length packet.
*/
struct PACKET_CA_ACK_MOBILE_OTP {
- int16 packet_id; ///< Packet ID (#PACKET_ID_CA_SSO_LOGIN_REQ)
+ int16 packet_id; ///< Packet ID (#PACKET_ID_CA_ACK_MOBILE_OTP)
int16 packet_len; ///< Length (variable length)
uint32 aid; ///< Account ID
char code[6]; ///< Code
@@ -182,6 +182,17 @@ DEFINE_PACKET_HEADER(CA_ACK_MOBILE_OTP, 0x09a3);
#define packet_CA_ACK_MOBILE_OTP PACKET_CA_ACK_MOBILE_OTP
#endif
+#if PACKETVER_MAIN_NUM >= 20181114 || PACKETVER_RE_NUM >= 20181114 || defined(PACKETVER_ZERO)
+struct PACKET_CA_OTP_CODE {
+ int16 packet_id; ///< Packet ID (#PACKET_ID_CA_OTP_CODE)
+ char code[9]; ///< Code
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CA_OTP_CODE, 0x0ad0);
+
+#define PACKET_ID_CA_OTP_CODE HEADER_CA_OTP_CODE
+#define packet_CA_OTP_CODE PACKET_CA_OTP_CODE
+#endif
+
/**
* Packet structure for CA_LOGIN_OTP.
*/
@@ -363,6 +374,7 @@ struct lclif_interface_private {
LoginParseFunc *parse_CA_SSO_LOGIN_REQ; ///< Packet handler for #packet_CA_SSO_LOGIN_REQ.
LoginParseFunc *parse_CA_LOGIN_OTP; ///< Packet handler for #packet_CA_LOGIN_OTP.
LoginParseFunc *parse_CA_ACK_MOBILE_OTP; ///< Packet handler for #packet_CA_ACK_MOBILE_OTP.
+ LoginParseFunc *parse_CA_OTP_CODE; ///< Packet handler for #packet_CA_OTP_CODE.
LoginParseFunc *parse_CA_REQ_HASH; ///< Packet handler for #packet_CA_REQ_HASH.
LoginParseFunc *parse_CA_CHARSERVERCONNECT; ///< Packet handler for #packet_CA_CHARSERVERCONNECT.
};