summaryrefslogtreecommitdiff
path: root/accel-pptpd/ipdb.h
blob: ebf38853e90e8fad19e3ac2c4fa8252f5363a5b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef IPDB_H
#define IPDB_H

#include <netinet/in.h>

#include "ppp.h"
#include "list.h"

struct ipdb_item_t
{
	struct ipdb_t *owner;
	in_addr_t addr;
	in_addr_t peer_addr;
};

struct ipdb_t
{
	struct list_head entry;
	struct ipdb_item_t *(*get)(struct ppp_t *ppp);
	void (*put)(struct ppp_t *ppp, struct ipdb_item_t *);
};

struct ipdb_item_t *ipdb_get(struct ppp_t *ppp);
void ipdb_put(struct ppp_t *ppp, struct ipdb_item_t *);

void ipdb_register(struct ipdb_t *);

#endif