summaryrefslogtreecommitdiff
path: root/src/login/lclif.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/login/lclif.c')
-rw-r--r--src/login/lclif.c80
1 files changed, 40 insertions, 40 deletions
diff --git a/src/login/lclif.c b/src/login/lclif.c
index f514932a2..f8fd30105 100644
--- a/src/login/lclif.c
+++ b/src/login/lclif.c
@@ -41,13 +41,13 @@
* Implementation of the login client interface.
*/
-struct lclif_interface lclif_s;
-struct lclif_interface_private lclif_p;
-struct lclif_interface_dbs lclif_dbs;
+static struct lclif_interface lclif_s;
+static struct lclif_interface_private lclif_p;
+static struct lclif_interface_dbs lclif_dbs;
struct lclif_interface *lclif;
/// @copydoc lclif_interface::connection_error()
-void lclif_connection_error(int fd, uint8 error)
+static void lclif_connection_error(int fd, uint8 error)
{
struct packet_SC_NOTIFY_BAN *packet = NULL;
WFIFOHEAD(fd, sizeof(*packet));
@@ -58,15 +58,15 @@ void lclif_connection_error(int fd, uint8 error)
}
/// @copydoc lclif_interface_private::parse_CA_CONNECT_INFO_CHANGED()
-enum parsefunc_rcode lclif_parse_CA_CONNECT_INFO_CHANGED(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
-enum parsefunc_rcode lclif_parse_CA_CONNECT_INFO_CHANGED(int fd, struct login_session_data *sd)
+static enum parsefunc_rcode lclif_parse_CA_CONNECT_INFO_CHANGED(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
+static enum parsefunc_rcode lclif_parse_CA_CONNECT_INFO_CHANGED(int fd, struct login_session_data *sd)
{
return PACKET_VALID;
}
/// @copydoc lclif_interface_private::parse_CA_EXE_HASHCHECK()
-enum parsefunc_rcode lclif_parse_CA_EXE_HASHCHECK(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
-enum parsefunc_rcode lclif_parse_CA_EXE_HASHCHECK(int fd, struct login_session_data *sd)
+static enum parsefunc_rcode lclif_parse_CA_EXE_HASHCHECK(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
+static enum parsefunc_rcode lclif_parse_CA_EXE_HASHCHECK(int fd, struct login_session_data *sd)
{
const struct packet_CA_EXE_HASHCHECK *packet = RP2PTR(fd);
sd->has_client_hash = 1;
@@ -75,8 +75,8 @@ enum parsefunc_rcode lclif_parse_CA_EXE_HASHCHECK(int fd, struct login_session_d
}
/// @copydoc lclif_interface_private::parse_CA_LOGIN()
-enum parsefunc_rcode lclif_parse_CA_LOGIN(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
-enum parsefunc_rcode lclif_parse_CA_LOGIN(int fd, struct login_session_data *sd)
+static enum parsefunc_rcode lclif_parse_CA_LOGIN(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
+static enum parsefunc_rcode lclif_parse_CA_LOGIN(int fd, struct login_session_data *sd)
{
const struct packet_CA_LOGIN *packet = RP2PTR(fd);
@@ -94,8 +94,8 @@ enum parsefunc_rcode lclif_parse_CA_LOGIN(int fd, struct login_session_data *sd)
}
/// @copydoc lclif_interface_private::parse_CA_LOGIN2()
-enum parsefunc_rcode lclif_parse_CA_LOGIN2(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
-enum parsefunc_rcode lclif_parse_CA_LOGIN2(int fd, struct login_session_data *sd)
+static enum parsefunc_rcode lclif_parse_CA_LOGIN2(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
+static enum parsefunc_rcode lclif_parse_CA_LOGIN2(int fd, struct login_session_data *sd)
{
const struct packet_CA_LOGIN2 *packet = RP2PTR(fd);
@@ -110,8 +110,8 @@ enum parsefunc_rcode lclif_parse_CA_LOGIN2(int fd, struct login_session_data *sd
}
/// @copydoc lclif_interface_private::parse_CA_LOGIN3()
-enum parsefunc_rcode lclif_parse_CA_LOGIN3(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
-enum parsefunc_rcode lclif_parse_CA_LOGIN3(int fd, struct login_session_data *sd)
+static enum parsefunc_rcode lclif_parse_CA_LOGIN3(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
+static enum parsefunc_rcode lclif_parse_CA_LOGIN3(int fd, struct login_session_data *sd)
{
const struct packet_CA_LOGIN3 *packet = RP2PTR(fd);
@@ -128,8 +128,8 @@ enum parsefunc_rcode lclif_parse_CA_LOGIN3(int fd, struct login_session_data *sd
}
/// @copydoc lclif_interface_private::parse_CA_LOGIN4()
-enum parsefunc_rcode lclif_parse_CA_LOGIN4(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
-enum parsefunc_rcode lclif_parse_CA_LOGIN4(int fd, struct login_session_data *sd)
+static enum parsefunc_rcode lclif_parse_CA_LOGIN4(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
+static enum parsefunc_rcode lclif_parse_CA_LOGIN4(int fd, struct login_session_data *sd)
{
const struct packet_CA_LOGIN4 *packet = RP2PTR(fd);
@@ -146,8 +146,8 @@ enum parsefunc_rcode lclif_parse_CA_LOGIN4(int fd, struct login_session_data *sd
}
/// @copydoc lclif_interface_private::parse_CA_LOGIN_PCBANG()
-enum parsefunc_rcode lclif_parse_CA_LOGIN_PCBANG(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
-enum parsefunc_rcode lclif_parse_CA_LOGIN_PCBANG(int fd, struct login_session_data *sd)
+static enum parsefunc_rcode lclif_parse_CA_LOGIN_PCBANG(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
+static enum parsefunc_rcode lclif_parse_CA_LOGIN_PCBANG(int fd, struct login_session_data *sd)
{
const struct packet_CA_LOGIN_PCBANG *packet = RP2PTR(fd);
@@ -168,8 +168,8 @@ enum parsefunc_rcode lclif_parse_CA_LOGIN_PCBANG(int fd, struct login_session_da
}
/// @copydoc lclif_interface_private::parse_CA_LOGIN_HAN()
-enum parsefunc_rcode lclif_parse_CA_LOGIN_HAN(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
-enum parsefunc_rcode lclif_parse_CA_LOGIN_HAN(int fd, struct login_session_data *sd)
+static enum parsefunc_rcode lclif_parse_CA_LOGIN_HAN(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
+static enum parsefunc_rcode lclif_parse_CA_LOGIN_HAN(int fd, struct login_session_data *sd)
{
const struct packet_CA_LOGIN_HAN *packet = RP2PTR(fd);
@@ -191,8 +191,8 @@ enum parsefunc_rcode lclif_parse_CA_LOGIN_HAN(int fd, struct login_session_data
}
/// @copydoc lclif_interface_private::parse_CA_SSO_LOGIN_REQ()
-enum parsefunc_rcode lclif_parse_CA_SSO_LOGIN_REQ(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
-enum parsefunc_rcode lclif_parse_CA_SSO_LOGIN_REQ(int fd, struct login_session_data *sd)
+static enum parsefunc_rcode lclif_parse_CA_SSO_LOGIN_REQ(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
+static enum parsefunc_rcode lclif_parse_CA_SSO_LOGIN_REQ(int fd, struct login_session_data *sd)
{
const struct packet_CA_SSO_LOGIN_REQ *packet = RP2PTR(fd);
int tokenlen = (int)RFIFOREST(fd) - (int)sizeof(*packet);
@@ -217,8 +217,8 @@ enum parsefunc_rcode lclif_parse_CA_SSO_LOGIN_REQ(int fd, struct login_session_d
}
/// @copydoc lclif_interface_private::parse_CA_LOGIN_OTP()
-enum parsefunc_rcode lclif_parse_CA_LOGIN_OTP(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
-enum parsefunc_rcode lclif_parse_CA_LOGIN_OTP(int fd, struct login_session_data *sd)
+static enum parsefunc_rcode lclif_parse_CA_LOGIN_OTP(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
+static enum parsefunc_rcode lclif_parse_CA_LOGIN_OTP(int fd, struct login_session_data *sd)
{
//const struct packet_CA_LOGIN_OTP *packet = RP2PTR(fd);
login->client_login_otp(fd, sd);
@@ -226,8 +226,8 @@ enum parsefunc_rcode lclif_parse_CA_LOGIN_OTP(int fd, struct login_session_data
}
/// @copydoc lclif_interface_private::parse_CA_REQ_HASH()
-enum parsefunc_rcode lclif_parse_CA_REQ_HASH(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
-enum parsefunc_rcode lclif_parse_CA_REQ_HASH(int fd, struct login_session_data *sd)
+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)
{
memset(sd->md5key, '\0', sizeof(sd->md5key));
sd->md5keylen = (uint16)(12 + rnd() % 4);
@@ -238,8 +238,8 @@ enum parsefunc_rcode lclif_parse_CA_REQ_HASH(int fd, struct login_session_data *
}
/// @copydoc lclif_interface_private::parse_CA_CHARSERVERCONNECT()
-enum parsefunc_rcode lclif_parse_CA_CHARSERVERCONNECT(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
-enum parsefunc_rcode lclif_parse_CA_CHARSERVERCONNECT(int fd, struct login_session_data *sd)
+static enum parsefunc_rcode lclif_parse_CA_CHARSERVERCONNECT(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
+static enum parsefunc_rcode lclif_parse_CA_CHARSERVERCONNECT(int fd, struct login_session_data *sd)
{
char ip[16];
uint32 ipl = sockt->session[fd]->client_addr;
@@ -251,7 +251,7 @@ enum parsefunc_rcode lclif_parse_CA_CHARSERVERCONNECT(int fd, struct login_sessi
}
/// @copydoc lclif_interface::server_list()
-bool lclif_send_server_list(struct login_session_data *sd)
+static bool lclif_send_server_list(struct login_session_data *sd)
{
int server_num = 0, i, n, length;
uint32 ip;
@@ -309,7 +309,7 @@ bool lclif_send_server_list(struct login_session_data *sd)
}
/// @copydoc lclif_interface::auth_failed()
-void lclif_send_auth_failed(int fd, time_t ban, uint32 error)
+static void lclif_send_auth_failed(int fd, time_t ban, uint32 error)
{
#if PACKETVER_ZERO_NUM >= 20180627
struct packet_AC_REFUSE_LOGIN_R2 *packet = NULL;
@@ -333,7 +333,7 @@ void lclif_send_auth_failed(int fd, time_t ban, uint32 error)
}
/// @copydoc lclif_interface::login_error()
-void lclif_send_login_error(int fd, uint8 error)
+static void lclif_send_login_error(int fd, uint8 error)
{
struct packet_AC_REFUSE_LOGIN *packet = NULL;
WFIFOHEAD(fd, sizeof(*packet));
@@ -345,8 +345,8 @@ void lclif_send_login_error(int fd, uint8 error)
}
/// @copydoc lclif_interface::coding_key()
-void lclif_send_coding_key(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
-void lclif_send_coding_key(int fd, struct login_session_data *sd)
+static void lclif_send_coding_key(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
+static void lclif_send_coding_key(int fd, struct login_session_data *sd)
{
struct packet_AC_ACK_HASH *packet = NULL;
int16 size = sizeof(*packet) + sd->md5keylen;
@@ -360,7 +360,7 @@ void lclif_send_coding_key(int fd, struct login_session_data *sd)
}
/// @copydoc lclif_interface::parse()
-int lclif_parse(int fd)
+static int lclif_parse(int fd)
{
struct login_session_data *sd = NULL;
int i;
@@ -426,7 +426,7 @@ int lclif_parse(int fd)
}
/// @copydoc lclif_interface_private::parse_sub()
-enum parsefunc_rcode lclif_parse_sub(int fd, struct login_session_data *sd)
+static enum parsefunc_rcode lclif_parse_sub(int fd, struct login_session_data *sd)
{
int packet_len = (int)RFIFOREST(fd);
int16 packet_id = RFIFOW(fd, 0);
@@ -474,7 +474,7 @@ enum parsefunc_rcode lclif_parse_sub(int fd, struct login_session_data *sd)
}
/// @copydoc lclif_interface::packet()
-const struct login_packet_db *lclif_packet(int16 packet_id)
+static const struct login_packet_db *lclif_packet(int16 packet_id)
{
if (packet_id == PACKET_ID_CA_CHARSERVERCONNECT)
return &lclif->p->dbs->packet_db[0];
@@ -486,7 +486,7 @@ const struct login_packet_db *lclif_packet(int16 packet_id)
}
/// @copydoc lclif_interface::parse_packet()
-enum parsefunc_rcode lclif_parse_packet(const struct login_packet_db *lpd, int fd, struct login_session_data *sd)
+static enum parsefunc_rcode lclif_parse_packet(const struct login_packet_db *lpd, int fd, struct login_session_data *sd)
{
int result;
result = (*lpd->pFunc)(fd, sd);
@@ -495,7 +495,7 @@ enum parsefunc_rcode lclif_parse_packet(const struct login_packet_db *lpd, int f
}
/// @copydoc lclif_interface_private::packetdb_loaddb()
-void packetdb_loaddb(void)
+static void packetdb_loaddb(void)
{
int i;
struct packet {
@@ -536,13 +536,13 @@ void packetdb_loaddb(void)
}
/// @copydoc lclif_interface::init()
-void lclif_init(void)
+static void lclif_init(void)
{
lclif->p->packetdb_loaddb();
}
/// @copydoc lclif_interface::final()
-void lclif_final(void)
+static void lclif_final(void)
{
}