diff options
Diffstat (limited to 'lib/include')
-rw-r--r-- | lib/include/radsec/radsec-impl.h | 4 | ||||
-rw-r--r-- | lib/include/radsec/radsec.h | 3 | ||||
-rw-r--r-- | lib/include/radsec/request.h | 6 |
3 files changed, 10 insertions, 3 deletions
diff --git a/lib/include/radsec/radsec-impl.h b/lib/include/radsec/radsec-impl.h index b46bc47..6e5ee83 100644 --- a/lib/include/radsec/radsec-impl.h +++ b/lib/include/radsec/radsec-impl.h @@ -63,9 +63,12 @@ struct rs_connection { enum rs_conn_type type; struct rs_credentials transport_credentials; struct rs_conn_callbacks callbacks; + void *user_data; struct rs_peer *peers; struct rs_peer *active_peer; struct rs_error *err; + int nextid; + int user_dispatch_flag : 1; /* User does the dispatching. */ }; struct rs_packet { @@ -73,6 +76,7 @@ struct rs_packet { char hdr_read_flag; uint8_t hdr[4]; RADIUS_PACKET *rpkt; + struct rs_packet *original; }; struct rs_attr { diff --git a/lib/include/radsec/radsec.h b/lib/include/radsec/radsec.h index 1d12787..8e97072 100644 --- a/lib/include/radsec/radsec.h +++ b/lib/include/radsec/radsec.h @@ -17,6 +17,7 @@ enum rs_err_code { RSE_EVENT = 9, RSE_CONNERR = 10, RSE_CONFIG = 11, + RSE_BADAUTH = 12, RSE_SOME_ERROR = 21, }; @@ -96,6 +97,7 @@ int rs_conn_select_server(struct rs_connection *conn, const char *name); int rs_conn_get_current_server(struct rs_connection *conn, const char *name, size_t buflen); int rs_conn_receive_packet(struct rs_connection *conn, + struct rs_packet *request, struct rs_packet **pkt_out); int rs_conn_fd(struct rs_connection *conn); @@ -118,6 +120,7 @@ int rs_packet_send(struct rs_packet *pkt, void *data); struct radius_packet *rs_packet_frpkt(struct rs_packet *pkt); /* Attribute. */ +/* FIXME: Replace (or complement) with a wrapper for paircreate(). */ int rs_attr_create(struct rs_connection *conn, struct rs_attr **attr, const char *type, const char *val); void rs_attr_destroy(struct rs_attr *attr); diff --git a/lib/include/radsec/request.h b/lib/include/radsec/request.h index 3827da5..939345e 100644 --- a/lib/include/radsec/request.h +++ b/lib/include/radsec/request.h @@ -2,6 +2,6 @@ struct rs_request; -int rs_req_create(struct rs_connection *conn, struct rs_request **req_out); -void rs_req_destroy(struct rs_request *request); -int rs_req_send(struct rs_request *request, struct rs_packet *req, struct rs_packet **resp); +int rs_request_create(struct rs_connection *conn, struct rs_request **req_out); +void rs_request_destroy(struct rs_request *request); +int rs_request_send(struct rs_request *request, struct rs_packet *req, struct rs_packet **resp); |