33 lines
646 B
C
33 lines
646 B
C
#pragma once
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <errno.h>
|
|
#include <string.h>
|
|
#include "packet.h"
|
|
#include "evt_core.h"
|
|
#include "utils.h"
|
|
|
|
struct algo_skel {
|
|
struct evt_core_cat on_udp_read;
|
|
struct evt_core_cat on_tcp_read;
|
|
struct evt_core_cat on_udp_write;
|
|
struct evt_core_cat on_tcp_write;
|
|
struct evt_core_cat on_tcp_co;
|
|
};
|
|
|
|
typedef void (*algo_init)(struct algo_skel* as);
|
|
|
|
void init_algo(struct algo_skel* as, char* name);
|
|
void algo_naive(struct algo_skel* as);
|
|
|
|
struct algo_desc {
|
|
algo_init init;
|
|
char* name;
|
|
};
|
|
|
|
static struct algo_desc available_algo[] = {
|
|
{
|
|
.init = algo_naive,
|
|
.name = "naive"
|
|
}
|
|
};
|