From cef9bf7b7340b7270eb979294aeb186d741e6318 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Mon, 14 Mar 2011 13:27:39 +0100 Subject: Remove struct rs_attr and all use of it. A new API for attributes will be added once we've decided how to deal with RADIUS packets internally. For now, removing the half baked wrapping seems more sensible than trying to free rs_attr objects and their VALUE_PAIR's. --- lib/include/radsec/radsec-impl.h | 7 +------ lib/include/radsec/radsec.h | 17 ----------------- 2 files changed, 1 insertion(+), 23 deletions(-) (limited to 'lib/include') diff --git a/lib/include/radsec/radsec-impl.h b/lib/include/radsec/radsec-impl.h index 9bcd208..3c1c53c 100644 --- a/lib/include/radsec/radsec-impl.h +++ b/lib/include/radsec/radsec-impl.h @@ -104,15 +104,10 @@ struct rs_packet { struct rs_connection *conn; unsigned int flags; uint8_t hdr[RS_HEADER_LEN]; - RADIUS_PACKET *rpkt; + RADIUS_PACKET *rpkt; /* FreeRADIUS object. */ struct rs_packet *next; /* Used for UDP output queue. */ }; -struct rs_attr { - struct rs_packet *pkt; - VALUE_PAIR *vp; -}; - /* Nonpublic functions (in radsec.c -- FIXME: move?). */ struct rs_error *rs_resolv (struct evutil_addrinfo **addr, rs_conn_type_t type, diff --git a/lib/include/radsec/radsec.h b/lib/include/radsec/radsec.h index 66c55f3..6b0a69c 100644 --- a/lib/include/radsec/radsec.h +++ b/lib/include/radsec/radsec.h @@ -49,7 +49,6 @@ struct rs_context; /* radsec-impl.h */ struct rs_connection; /* radsec-impl.h */ struct rs_packet; /* radsec-impl.h */ struct rs_conn; /* radsec-impl.h */ -struct rs_attr; /* radsec-impl.h */ struct rs_error; /* radsec-impl.h */ struct rs_peer; /* radsec-impl.h */ struct radius_packet; /* */ @@ -222,9 +221,6 @@ int rs_packet_create(struct rs_connection *conn, struct rs_packet **pkt_out); /** Free all memory allocated for packet \a pkt. */ void rs_packet_destroy(struct rs_packet *pkt); -/** Add attribute \a attr to packet \a pkt. */ -void rs_packet_add_attr(struct rs_packet *pkt, struct rs_attr *attr); - /** Send packet \a pkt on the connection associated with \a pkt. \a user_data is sent to the \a rs_conn_packet_received_cb callback registered with the connection. If no callback is registered with @@ -249,19 +245,6 @@ int rs_packet_create_authn_request(struct rs_connection *conn, const char *user_name, const char *user_pw); -/***************/ -/* Attribute. */ -/***************/ -/* FIXME: Replace (or complement) with a wrapper for paircreate(). */ -/** Create a RADIUS attribute of type \a type and with the value \a - val. */ -int rs_attr_create(struct rs_connection *conn, - struct rs_attr **attr, - const char *type, - const char *val); -/** Free memory for RADIUS attribute \a attr. */ -void rs_attr_destroy(struct rs_attr *attr); - /************/ /* Config. */ /************/ -- cgit v1.1