radsecproxy-1.6.5.
[libradsec.git] / tlv11.h
1 /*
2  * Copyright (C) 2008 Stig Venaas <venaas@uninett.no>
3  * Copyright (C) 2010 NORDUnet A/S
4  *
5  * Permission to use, copy, modify, and distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  */
9
10 struct tlv {
11     uint8_t t;
12     uint8_t l;
13     uint8_t *v;
14 };
15
16 struct tlv *maketlv(uint8_t, uint8_t, void *);
17 struct tlv *copytlv(struct tlv *);
18 void freetlv(struct tlv *);
19 int eqtlv(struct tlv *, struct tlv *);
20 struct list *copytlvlist(struct list *);
21 void freetlvlist(struct list *);
22 void rmtlv(struct list *, uint8_t);
23 uint8_t *tlv2str(struct tlv *tlv);
24 uint8_t *tlv2buf(uint8_t *, const struct tlv *tlv);
25
26 /* Local Variables: */
27 /* c-file-style: "stroustrup" */
28 /* End: */