mirror of
https://github.com/CPunch/Laika.git
synced 2025-09-26 03:40:05 +00:00
Lib: Added support for IPV6 connections
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
|
||||
/* settings */
|
||||
#cmakedefine LAIKA_PERSISTENCE
|
||||
|
||||
#cmakedefine LAIKA_OBFUSCATE
|
||||
|
||||
/* raw obfuscated strings */
|
||||
|
@@ -9,7 +9,7 @@
|
||||
#define LAIKA_MAX_PKTSIZE 4096
|
||||
|
||||
#define LAIKA_HOSTNAME_LEN 64
|
||||
#define LAIKA_IPV4_LEN 22
|
||||
#define LAIKA_IPSTR_LEN 64
|
||||
#define LAIKA_INET_LEN 22
|
||||
|
||||
#define LAIKA_SHELL_DATA_MAX_LENGTH 2048
|
||||
@@ -99,7 +99,7 @@ enum {
|
||||
* uint8_t pubKey[crypto_kx_PUBLICKEYBYTES]; -- pubkey of said bot
|
||||
* char hostname[LAIKA_HOSTNAME_LEN];
|
||||
* char inet[LAIKA_INET_LEN];
|
||||
* char ipv4[LAIKA_IPV4_LEN];
|
||||
* char ipStr[LAIKA_IPSTR_LEN];
|
||||
* uint8_t peerType;
|
||||
* uint8_t osType;
|
||||
*/
|
||||
|
@@ -46,7 +46,7 @@ struct sLaika_peer {
|
||||
struct sLaika_contentContext context;
|
||||
uint8_t peerPub[crypto_kx_PUBLICKEYBYTES]; /* connected peer's public key */
|
||||
uint8_t inKey[crypto_kx_SESSIONKEYBYTES], outKey[crypto_kx_SESSIONKEYBYTES];
|
||||
char hostname[LAIKA_HOSTNAME_LEN], inet[LAIKA_INET_LEN], ipv4[LAIKA_IPV4_LEN];
|
||||
char hostname[LAIKA_HOSTNAME_LEN], inet[LAIKA_INET_LEN], ipStr[LAIKA_IPSTR_LEN];
|
||||
struct sLaika_pollList *pList; /* pollList we're activeList in */
|
||||
struct sLaika_peerPacketInfo *packetTbl; /* const table to pull pkt data from */
|
||||
void *uData; /* data to be passed to pktHandler */
|
||||
|
@@ -92,7 +92,7 @@ void laikaS_cleanSocket(struct sLaika_socket *sock);
|
||||
void laikaS_kill(struct sLaika_socket *sock); /* kills a socket */
|
||||
void laikaS_connect(struct sLaika_socket *sock, char *ip, char *port); /* connect to ip & port */
|
||||
void laikaS_bind(struct sLaika_socket *sock, uint16_t port); /* bind sock to port */
|
||||
void laikaS_acceptFrom(struct sLaika_socket *sock, struct sLaika_socket *from, char *ipv4);
|
||||
void laikaS_acceptFrom(struct sLaika_socket *sock, struct sLaika_socket *from, char *ipStr);
|
||||
bool laikaS_setNonBlock(struct sLaika_socket *sock);
|
||||
|
||||
void laikaS_consumeRead(struct sLaika_socket *sock, size_t sz); /* throws sz bytes away from the inBuf */
|
||||
|
Reference in New Issue
Block a user