diff options
author | Linus Nordberg <linus@nordu.net> | 2010-09-26 00:37:40 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2010-09-26 00:37:40 +0200 |
commit | 94e3f46ef6c976f6bbd670555262ec6466314d8a (patch) | |
tree | 5fe76cefc2fb868b3f2be8d1b0cd8dfa47fe16ad /lib/radsec.c | |
parent | cd66f4d2661093d245a6ffbb35c17d5b5812e9a3 (diff) |
Example client crafting simple packet using freeradius-libradius.
Diffstat (limited to 'lib/radsec.c')
-rw-r--r-- | lib/radsec.c | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/lib/radsec.c b/lib/radsec.c new file mode 100644 index 0000000..760da84 --- /dev/null +++ b/lib/radsec.c @@ -0,0 +1,71 @@ +#include <stdlib.h> +#include <stdint.h> +#include "libradsec.h" +#include "libradsec-impl.h" + +#define ERR_OK 0 +#define ERR_NOMEM 1 +#define ERR_NOSYS 2 +#define ERR_SOME_ERROR 99 + +int rs_context_create(struct rs_handle **ctx) +{ + *ctx = (struct rs_handle *) malloc (sizeof (struct rs_handle)); + return (ctx ? ERR_OK : ERR_NOMEM); +} + +void rs_context_destroy(struct rs_handle *ctx) +{ + free (ctx); +} + +int rs_context_set_alloc_scheme(struct rs_handle *ctx, struct rs_alloc_scheme *scheme) +{ + return ERR_NOSYS; +} + +int rs_context_config_read(struct rs_handle *ctx, const char *config_file) +{ + return ERR_NOSYS; +} + +int rs_conn_create(const struct rs_handle *ctx, struct rs_connection **conn) +{ + return ERR_NOSYS; +} + +int rs_conn_destroy(struct rs_connection *conn) +{ + return ERR_NOSYS; +} + +int rs_conn_set_eventbase(struct rs_connection *conn, struct event_base *eb) +{ + return ERR_NOSYS; +} + +int rs_conn_set_callbacks(struct rs_connection *conn, struct rs_conn_callbacks *cb) +{ + return ERR_NOSYS; +} + +int rs_conn_set_server(struct rs_connection *conn, const char *name) +{ + return ERR_NOSYS; +} + +int rs_conn_get_server(const struct rs_connection *conn, const char *name, size_t buflen) +{ + return ERR_NOSYS; +} + +int rs_packet_send(const struct rs_conn *conn, const struct rs_packet *pkt, void *user_data) +{ + return ERR_NOSYS; +} + +int rs_packet_receive(const struct rs_conn *conn, struct rs_packet **pkt) +{ + return ERR_NOSYS; +} + |