760da84769aa0a09bbf10770b1e4f32bf3645051
[radsecproxy.git] / lib / radsec.c
1 #include <stdlib.h>
2 #include <stdint.h>
3 #include "libradsec.h"
4 #include "libradsec-impl.h"
5
6 #define ERR_OK 0
7 #define ERR_NOMEM 1
8 #define ERR_NOSYS 2
9 #define ERR_SOME_ERROR 99
10
11 int rs_context_create(struct rs_handle **ctx)
12 {
13   *ctx = (struct rs_handle *) malloc (sizeof (struct rs_handle));
14   return (ctx ? ERR_OK : ERR_NOMEM);
15 }
16
17 void rs_context_destroy(struct rs_handle *ctx)
18 {
19   free (ctx);
20 }
21
22 int rs_context_set_alloc_scheme(struct rs_handle *ctx, struct rs_alloc_scheme *scheme)
23 {
24   return ERR_NOSYS;
25 }
26
27 int rs_context_config_read(struct rs_handle *ctx, const char *config_file)
28 {
29   return ERR_NOSYS;
30 }
31
32 int rs_conn_create(const struct rs_handle *ctx, struct rs_connection **conn)
33 {
34   return ERR_NOSYS;
35 }
36
37 int rs_conn_destroy(struct rs_connection  *conn)
38 {
39   return ERR_NOSYS;
40 }
41
42 int rs_conn_set_eventbase(struct rs_connection *conn, struct event_base *eb)
43 {
44   return ERR_NOSYS;
45 }
46
47 int rs_conn_set_callbacks(struct rs_connection *conn, struct rs_conn_callbacks *cb)
48 {
49   return ERR_NOSYS;
50 }
51
52 int rs_conn_set_server(struct rs_connection *conn, const char *name)
53 {
54   return ERR_NOSYS;
55 }
56
57 int rs_conn_get_server(const struct rs_connection *conn, const char *name, size_t buflen)
58 {
59   return ERR_NOSYS;
60 }
61
62 int rs_packet_send(const struct rs_conn *conn, const struct rs_packet *pkt, void *user_data)
63 {
64   return ERR_NOSYS;
65 }
66
67 int rs_packet_receive(const struct rs_conn *conn, struct rs_packet **pkt)
68 {
69   return ERR_NOSYS;
70 }
71