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