added TLS/SSL support
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
#ifndef IRC_STRUCTS_H
|
||||
#define IRC_STRUCTS_H
|
||||
|
||||
#include "netcode.h"
|
||||
#include <stdbool.h>
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
typedef enum
|
||||
{
|
||||
@@ -34,7 +36,7 @@ typedef struct
|
||||
typedef struct
|
||||
{
|
||||
char name[64];
|
||||
char topic[512];
|
||||
char topic[513];
|
||||
irc_chanuser_t* users;
|
||||
} irc_channel_t;
|
||||
|
||||
@@ -68,22 +70,40 @@ typedef struct
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int sockfd;
|
||||
char nick[32];
|
||||
char altnick[32];
|
||||
char altnick2[32];
|
||||
char username[16];
|
||||
char realname[128];
|
||||
} irc_identity_t;
|
||||
typedef enum
|
||||
{
|
||||
IRC_CONNECTION_PLAINTEXT,
|
||||
IRC_CONNECTION_TLS
|
||||
} irc_connection_type_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char host[128];
|
||||
int port;
|
||||
irc_connection_type_t connType;
|
||||
} irc_connection_info_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
irc_connection_info_t connectionInfo;
|
||||
sslSockfd_t connection;
|
||||
irc_hostmask_t ownHostmask;
|
||||
char supportedCapabilities[512];
|
||||
char requestedCapabilities[512];
|
||||
char supportedCapabilities[513];
|
||||
char requestedCapabilities[513];
|
||||
irc_capability_t acked[24];
|
||||
|
||||
/* Authentication parameters */
|
||||
irc_auth_t saslAuth;
|
||||
} irc_client_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char nick[32];
|
||||
char ident[16];
|
||||
char realname[64];
|
||||
} irc_identity_t;
|
||||
/* Identity */
|
||||
irc_identity_t identity;
|
||||
} irc_client_t;
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
|
||||
Reference in New Issue
Block a user