New upstream version 8.1.0

This commit is contained in:
geos_one
2025-08-10 01:34:16 +02:00
commit c891bb7105
4398 changed files with 838833 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
#ifndef GETHOSTBYNAMEMSG_H_
#define GETHOSTBYNAMEMSG_H_
#include <common/net/message/NetMessage.h>
struct GetHostByNameMsg;
typedef struct GetHostByNameMsg GetHostByNameMsg;
static inline void GetHostByNameMsg_init(GetHostByNameMsg* this);
static inline void GetHostByNameMsg_initFromHostname(GetHostByNameMsg* this,
const char* hostname);
// virtual functions
extern void GetHostByNameMsg_serializePayload(NetMessage* this, SerializeCtx* ctx);
extern bool GetHostByNameMsg_deserializePayload(NetMessage* this, DeserializeCtx* ctx);
struct GetHostByNameMsg
{
NetMessage netMessage;
unsigned hostnameLen;
const char* hostname;
};
extern const struct NetMessageOps GetHostByNameMsg_Ops;
void GetHostByNameMsg_init(GetHostByNameMsg* this)
{
NetMessage_init(&this->netMessage, NETMSGTYPE_GetHostByName, &GetHostByNameMsg_Ops);
}
/**
* @param hostname just a reference, so do not free it as long as you use this object!
*/
void GetHostByNameMsg_initFromHostname(GetHostByNameMsg* this,
const char* hostname)
{
GetHostByNameMsg_init(this);
this->hostname = hostname;
this->hostnameLen = strlen(hostname);
}
#endif /*GETHOSTBYNAMEMSG_H_*/