2023-01-17 20:22:43 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/param.h>
|
|
|
|
#include <sys/cpuset.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#include <sys/time.h>
|
|
|
|
|
|
|
|
#include <openssl/ssl.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <time.h>
|
2023-01-18 00:24:49 +00:00
|
|
|
#include <bsock/bsock.h>
|
2023-01-17 20:22:43 +00:00
|
|
|
|
|
|
|
#include "mod.h"
|
|
|
|
|
2023-01-18 00:24:49 +00:00
|
|
|
struct ppd_bsock_io_ssl_ctx {
|
|
|
|
SSL * ssl;
|
|
|
|
char * ssl_readbuf;
|
|
|
|
size_t ssl_readbuf_len;
|
|
|
|
};
|
|
|
|
|
2023-03-02 14:12:35 +00:00
|
|
|
struct bsock_ringbuf_io ppd_bsock_io_ssl(void);
|
2023-01-18 00:24:49 +00:00
|
|
|
|
|
|
|
int ppd_readmsg(struct bsock *bsock, char *buf, size_t len);
|
2023-01-17 20:22:43 +00:00
|
|
|
|
2023-01-18 00:24:49 +00:00
|
|
|
int ppd_writemsg(struct bsock *bsock, struct ppd_msg *msg);
|
2023-01-17 20:22:43 +00:00
|
|
|
|
2023-03-02 14:12:35 +00:00
|
|
|
int
|
|
|
|
ppd_readbuf(int fd, void *buf, int len);
|
|
|
|
|
|
|
|
int
|
|
|
|
ppd_writebuf(int fd, void *buf, int len);
|