Removed "addport" functionality.
[freeradius.git] / src / include / libradius.h
1 #ifndef LIBRADIUS_H
2 #define LIBRADIUS_H
3
4 /*
5  * @file libradius.h
6  * @brief       Structures and prototypes
7  *              for the radius library.
8  *
9  * Version:     $Id$
10  *
11  *   This library is free software; you can redistribute it and/or
12  *   modify it under the terms of the GNU Lesser General Public
13  *   License as published by the Free Software Foundation; either
14  *   version 2.1 of the License, or (at your option) any later version.
15  *
16  *   This library is distributed in the hope that it will be useful,
17  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
18  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  *   Lesser General Public License for more details.
20  *
21  *   You should have received a copy of the GNU Lesser General Public
22  *   License along with this library; if not, write to the Free Software
23  *   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
24  *
25  * Copyright 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008  The FreeRADIUS server project
26  */
27
28 #include <freeradius-devel/ident.h>
29 RCSIDH(libradius_h, "$Id$")
30
31 #include <freeradius-devel/missing.h>
32
33 #ifdef HAVE_ERRNO_H
34 #include <errno.h>
35 #endif
36
37 #include <stdio.h>
38 #include <stdlib.h>
39 #include <stdarg.h>
40
41 #include <freeradius-devel/radius.h>
42 #include <freeradius-devel/token.h>
43 #include <freeradius-devel/hash.h>
44
45 #ifdef SIZEOF_UNSIGNED_INT
46 #if SIZEOF_UNSIGNED_INT != 4
47 #error FATAL: sizeof(unsigned int) != 4
48 #endif
49 #endif
50
51 /*
52  *  Include for modules.
53  */
54 #include <freeradius-devel/sha1.h>
55 #include <freeradius-devel/md4.h>
56
57 #ifndef WITHOUT_TCP
58 #define WITH_TCP (1)
59 #endif
60
61 #ifdef __cplusplus
62 extern "C" {
63 #endif
64
65 #define EAP_START               2
66
67 #define AUTH_VECTOR_LEN         16
68 #define CHAP_VALUE_LENGTH       16
69 #define MAX_STRING_LEN          254     /* RFC2138: string 0-253 octets */
70 #define FR_MAX_VENDOR           (1 << 24) /* RFC limitations */
71
72 #ifdef _LIBRADIUS
73 #  define AUTH_HDR_LEN          20
74 #  define VENDORPEC_USR         429
75 #define VENDORPEC_LUCENT        4846
76 #define VENDORPEC_STARENT       8164
77 #  define DEBUG                 if (fr_debug_flag && fr_log_fp) fr_printf_log
78 #  define debug_pair(vp)        do { if (fr_debug_flag && fr_log_fp) { \
79                                         vp_print(fr_log_fp, vp); \
80                                      } \
81                                 } while(0)
82 #  define TAG_VALID(x)          ((x) > 0 && (x) < 0x20)
83 #  define TAG_VALID_ZERO(x)     ((x) < 0x20)
84 #  define TAG_ANY               -128   /* minimum signed char */
85 #endif
86
87 #if defined(__GNUC__)
88 # define PRINTF_LIKE(n) __attribute__ ((format(printf, n, n+1)))
89 # define NEVER_RETURNS __attribute__ ((noreturn))
90 # define UNUSED __attribute__ ((unused))
91 # define BLANK_FORMAT " "       /* GCC_LINT whines about empty formats */
92 #else
93 # define PRINTF_LIKE(n) /* ignore */
94 # define NEVER_RETURNS /* ignore */
95 # define UNUSED /* ignore */
96 # define BLANK_FORMAT ""
97 #endif
98
99 typedef struct attr_flags {
100         unsigned int            has_tag : 1;  /* tagged attribute */
101         unsigned int            do_xlat : 1;  /* strvalue is dynamic */
102         unsigned int            unknown_attr : 1; /* not in dictionary */
103         unsigned int            array : 1; /* pack multiples into 1 attr */
104         unsigned int            has_value : 1; /* has a value */
105         unsigned int            has_value_alias : 1; /* has a value alias */
106         unsigned int            has_tlv : 1; /* has sub attributes */
107         unsigned int            is_tlv : 1; /* is a sub attribute */
108         unsigned int            extended : 1; /* extended attribute */
109         unsigned int            extended_flags : 1; /* with flag */
110         unsigned int            evs : 1;            /* extended VSA */
111         unsigned int            wimax: 1;           /* WiMAX format=1,1,c */
112
113         int8_t                  tag;          /* tag for tunneled attributes */
114         uint8_t                 encrypt;      /* encryption method */
115         uint8_t                 length;
116 } ATTR_FLAGS;
117
118 /*
119  *  Values of the encryption flags.
120  */
121 #define FLAG_ENCRYPT_NONE            (0)
122 #define FLAG_ENCRYPT_USER_PASSWORD   (1)
123 #define FLAG_ENCRYPT_TUNNEL_PASSWORD (2)
124 #define FLAG_ENCRYPT_ASCEND_SECRET   (3)
125
126 extern const FR_NAME_NUMBER dict_attr_types[];
127
128 typedef struct dict_attr {
129         unsigned int            attr;
130         int                     type;
131         unsigned int            vendor;
132         ATTR_FLAGS              flags;
133         char                    name[1];
134 } DICT_ATTR;
135
136 typedef struct dict_value {
137         unsigned int            attr;
138         unsigned int            vendor;
139         int                     value;
140         char                    name[1];
141 } DICT_VALUE;
142
143 typedef struct dict_vendor {
144         unsigned int            vendorpec;
145         size_t                  type; /* length of type data */
146         size_t                  length; /* length of length data */
147         size_t                  flags;
148         char                    name[1];
149 } DICT_VENDOR;
150
151 typedef union value_pair_data {
152         char                    strvalue[MAX_STRING_LEN];
153         uint8_t                 octets[MAX_STRING_LEN];
154         struct in_addr          ipaddr;
155         struct in6_addr         ipv6addr;
156         uint32_t                date;
157         uint32_t                integer;
158         int32_t                 sinteger;
159         uint64_t                integer64;
160         uint8_t                 filter[32];
161         uint8_t                 ifid[8]; /* struct? */
162         uint8_t                 ipv6prefix[18]; /* struct? */
163         uint8_t                 ether[6];
164         uint8_t                 *tlv;
165 } VALUE_PAIR_DATA;
166
167 typedef struct value_pair {
168         const char              *name;
169         unsigned int            attribute;
170         unsigned int            vendor;
171         int                     type;
172         size_t                  length; /* of data */
173 #ifdef __cplusplus
174         /*
175          *      C++ hackery.  The server and modules are all C, so
176          *      the defs here don't affect them.  But any C++ code
177          *      gets excited over "operator", so we change the name.
178          */
179         FR_TOKEN                op_token;
180 #else
181         FR_TOKEN                operator;
182 #endif
183         ATTR_FLAGS              flags;
184         struct value_pair       *next;
185         uint32_t                lvalue;
186         VALUE_PAIR_DATA         data;
187 } VALUE_PAIR;
188 #define vp_strvalue   data.strvalue
189 #define vp_octets     data.octets
190 #define vp_ipv6addr   data.ipv6addr
191 #define vp_ifid       data.ifid
192 #define vp_ipv6prefix data.ipv6prefix
193 #define vp_filter     data.filter
194 #define vp_ether      data.ether
195 #define vp_signed     data.sinteger
196 #define vp_tlv        data.tlv
197 #define vp_integer64  data.integer64
198
199 #if 0
200 #define vp_ipaddr     data.ipaddr.s_addr
201 #define vp_date       data.date
202 #define vp_integer    data.integer
203 #else
204 /*
205  *      These are left as lvalue until we audit the source for code
206  *      that prints to vp_strvalue for integer/ipaddr/date types.
207  */
208 #define vp_ipaddr     lvalue
209 #define vp_date       lvalue
210 #define vp_integer    lvalue
211 #endif
212
213
214 typedef struct fr_ipaddr_t {
215         int             af;     /* address family */
216         union {
217                 struct in_addr  ip4addr;
218                 struct in6_addr ip6addr; /* maybe defined in missing.h */
219         } ipaddr;
220         uint32_t        scope;  /* for IPv6 */
221 } fr_ipaddr_t;
222
223 /*
224  *      vector:         Request authenticator from access-request packet
225  *                      Put in there by rad_decode, and must be put in the
226  *                      response RADIUS_PACKET as well before calling rad_send
227  *
228  *      verified:       Filled in by rad_decode for accounting-request packets
229  *
230  *      data,data_len:  Used between rad_recv and rad_decode.
231  */
232 typedef struct radius_packet {
233         int                     sockfd;
234         fr_ipaddr_t             src_ipaddr;
235         fr_ipaddr_t             dst_ipaddr;
236         uint16_t                src_port;
237         uint16_t                dst_port;
238         int                     id;
239         unsigned int            code;
240         uint32_t                hash;
241         uint8_t                 vector[AUTH_VECTOR_LEN];
242         struct timeval          timestamp;
243         uint8_t                 *data;
244         ssize_t                 data_len;
245         VALUE_PAIR              *vps;
246         ssize_t                 offset;
247 #ifdef WITH_TCP
248         ssize_t                 partial;
249 #endif
250 } RADIUS_PACKET;
251
252 /*
253  *      Printing functions.
254  */
255 int             fr_utf8_char(const uint8_t *str);
256 size_t          fr_print_string(const char *in, size_t inlen,
257                                  char *out, size_t outlen);
258 int             vp_prints_value(char *out, size_t outlen,
259                                 const VALUE_PAIR *vp, int delimitst);
260 int             vp_prints_value_json(char *out, size_t outlen,
261                                 const VALUE_PAIR *vp);
262 size_t          vp_print_name(char *buffer, size_t bufsize,
263                                unsigned int attr, unsigned int vendor);
264 int             vp_prints(char *out, size_t outlen, const VALUE_PAIR *vp);
265 void            vp_print(FILE *, const VALUE_PAIR *);
266 void            vp_printlist(FILE *, const VALUE_PAIR *);
267 #define         fprint_attr_val vp_print
268
269 /*
270  *      Dictionary functions.
271  */
272 int             dict_str2oid(const char *ptr, unsigned int *pattr,
273                              int vendor, int tlv_depth);
274 int             dict_addvendor(const char *name, unsigned int value);
275 int             dict_addattr(const char *name, int attr, unsigned int vendor, int type, ATTR_FLAGS flags);
276 int             dict_addvalue(const char *namestr, const char *attrstr, int value);
277 int             dict_init(const char *dir, const char *fn);
278 void            dict_free(void);
279 DICT_ATTR       *dict_attrbyvalue(unsigned int attr, unsigned int vendor);
280 DICT_ATTR       *dict_attrbyname(const char *attr);
281 DICT_VALUE      *dict_valbyattr(unsigned int attr, unsigned int vendor, int val);
282 DICT_VALUE      *dict_valbyname(unsigned int attr, unsigned int vendor, const char *val);
283 int             dict_vendorbyname(const char *name);
284 DICT_VENDOR     *dict_vendorbyvalue(int vendor);
285
286 #if 1 /* FIXME: compat */
287 #define dict_attrget    dict_attrbyvalue
288 #define dict_attrfind   dict_attrbyname
289 #define dict_valfind    dict_valbyname
290 /*#define dict_valget   dict_valbyattr almost but not quite*/
291 #endif
292
293 /* get around diffrent ctime_r styles */
294 #ifdef CTIMERSTYLE
295 #if CTIMERSTYLE == SOLARISSTYLE
296 #define CTIME_R(a,b,c) ctime_r(a,b,c)
297 #else
298 #define CTIME_R(a,b,c) ctime_r(a,b)
299 #endif
300 #else
301 #define CTIME_R(a,b,c) ctime_r(a,b)
302 #endif
303
304 /* md5.c */
305
306 void            fr_md5_calc(uint8_t *, const uint8_t *, unsigned int);
307
308 /* hmac.c */
309
310 void fr_hmac_md5(const uint8_t *text, int text_len,
311                    const uint8_t *key, int key_len,
312                    unsigned char *digest);
313
314 /* hmacsha1.c */
315
316 void fr_hmac_sha1(const uint8_t *text, int text_len,
317                     const uint8_t *key, int key_len,
318                     uint8_t *digest);
319
320 /* radius.c */
321 int             rad_send(RADIUS_PACKET *, const RADIUS_PACKET *, const char *secret);
322 int             rad_packet_ok(RADIUS_PACKET *packet, int flags);
323 RADIUS_PACKET   *rad_recv(int fd, int flags);
324 ssize_t rad_recv_header(int sockfd, fr_ipaddr_t *src_ipaddr, int *src_port,
325                         int *code);
326 void            rad_recv_discard(int sockfd);
327 int             rad_verify(RADIUS_PACKET *packet, RADIUS_PACKET *original,
328                            const char *secret);
329 int             rad_decode(RADIUS_PACKET *packet, RADIUS_PACKET *original, const char *secret);
330 int             rad_encode(RADIUS_PACKET *packet, const RADIUS_PACKET *original,
331                            const char *secret);
332 int             rad_sign(RADIUS_PACKET *packet, const RADIUS_PACKET *original,
333                          const char *secret);
334
335 int rad_digest_cmp(const uint8_t *a, const uint8_t *b, size_t length);
336 RADIUS_PACKET   *rad_alloc(int newvector);
337 RADIUS_PACKET   *rad_alloc_reply(RADIUS_PACKET *);
338 void            rad_free(RADIUS_PACKET **);
339 int             rad_pwencode(char *encpw, size_t *len, const char *secret,
340                              const uint8_t *vector);
341 int             rad_pwdecode(char *encpw, size_t len, const char *secret,
342                              const uint8_t *vector);
343 int             rad_tunnel_pwencode(char *encpw, size_t *len, const char *secret,
344                                     const uint8_t *vector);
345 int             rad_tunnel_pwdecode(uint8_t *encpw, size_t *len,
346                                     const char *secret, const uint8_t *vector);
347 int             rad_chap_encode(RADIUS_PACKET *packet, uint8_t *output,
348                                 int id, VALUE_PAIR *password);
349
350 int rad_attr_ok(const RADIUS_PACKET *packet, const RADIUS_PACKET *original,
351                 DICT_ATTR *da,
352                 const uint8_t *data, size_t length);
353 int rad_tlv_ok(const uint8_t *data, size_t length,
354                size_t dv_type, size_t dv_length);
355
356 ssize_t rad_attr2vp_raw(const RADIUS_PACKET *packet,
357                         const RADIUS_PACKET *original,
358                         const char *secret,
359                         const uint8_t *data, size_t length,
360                         VALUE_PAIR **pvp);
361 ssize_t rad_attr2vp_extended(const RADIUS_PACKET *packet,
362                              const RADIUS_PACKET *original,
363                              const char *secret,
364                              const uint8_t *start, size_t length,
365                              VALUE_PAIR **pvp);
366 ssize_t rad_attr2vp_wimax(const RADIUS_PACKET *packet,
367                           const RADIUS_PACKET *original,
368                           const char *secret,
369                           const uint8_t *data, size_t length,
370                           VALUE_PAIR **pvp);
371
372 ssize_t rad_attr2vp_vsa(const RADIUS_PACKET *packet,
373                         const RADIUS_PACKET *original,
374                         const char *secret,
375                         const uint8_t *data, size_t length,
376                         VALUE_PAIR **pvp);
377 ssize_t rad_attr2vp_rfc(const RADIUS_PACKET *packet,
378                         const RADIUS_PACKET *original,
379                         const char *secret,
380                         const uint8_t *data, size_t length,
381                         VALUE_PAIR **pvp);
382
383 ssize_t         rad_attr2vp(const RADIUS_PACKET *packet, const RADIUS_PACKET *original,
384                             const char *secret,
385                             const uint8_t *data, size_t length,
386                             VALUE_PAIR **pvp);
387
388 int rad_vp2extended(const RADIUS_PACKET *packet,
389                     const RADIUS_PACKET *original,
390                     const char *secret, const VALUE_PAIR **pvp,
391                     uint8_t *ptr, size_t room);
392 int rad_vp2wimax(const RADIUS_PACKET *packet,
393                  const RADIUS_PACKET *original,
394                  const char *secret, const VALUE_PAIR **pvp,
395                  uint8_t *ptr, size_t room);
396 int rad_vp2vsa(const RADIUS_PACKET *packet, const RADIUS_PACKET *original,
397                const char *secret, const VALUE_PAIR **pvp, uint8_t *start,
398                size_t room);
399 int rad_vp2rfc(const RADIUS_PACKET *packet,
400                const RADIUS_PACKET *original,
401                const char *secret, const VALUE_PAIR **pvp,
402                uint8_t *ptr, size_t room);
403
404 int             rad_vp2attr(const RADIUS_PACKET *packet,
405                             const RADIUS_PACKET *original, const char *secret,
406                             const VALUE_PAIR **pvp, uint8_t *ptr, size_t room);
407
408 /* valuepair.c */
409 VALUE_PAIR      *pairalloc(DICT_ATTR *da);
410 VALUE_PAIR      *paircreate_raw(int attr, int vendor, int type, VALUE_PAIR *);
411 VALUE_PAIR      *paircreate(int attr, int vendor, int type);
412 void            pairfree(VALUE_PAIR **);
413 void            pairbasicfree(VALUE_PAIR *pair);
414 VALUE_PAIR      *pairfind(VALUE_PAIR *, unsigned int attr, unsigned int vendor);
415 void            pairdelete(VALUE_PAIR **, unsigned int attr, unsigned int vendor);
416 void            pairadd(VALUE_PAIR **, VALUE_PAIR *);
417 void            pairreplace(VALUE_PAIR **first, VALUE_PAIR *add);
418 int             paircmp(VALUE_PAIR *check, VALUE_PAIR *data);
419 VALUE_PAIR      *paircopyvp(const VALUE_PAIR *vp);
420 VALUE_PAIR      *paircopy(VALUE_PAIR *vp);
421 VALUE_PAIR      *paircopy2(VALUE_PAIR *vp, unsigned int attr, unsigned int vendor);
422 void            pairmove(VALUE_PAIR **to, VALUE_PAIR **from);
423 void            pairmove2(VALUE_PAIR **to, VALUE_PAIR **from, unsigned int attr, unsigned int vendor);
424 VALUE_PAIR      *pairparsevalue(VALUE_PAIR *vp, const char *value);
425 VALUE_PAIR      *pairmake(const char *attribute, const char *value, int operator);
426 VALUE_PAIR      *pairread(const char **ptr, FR_TOKEN *eol);
427 FR_TOKEN        userparse(const char *buffer, VALUE_PAIR **first_pair);
428 VALUE_PAIR     *readvp2(FILE *fp, int *pfiledone, const char *errprefix);
429
430 /*
431  *      Error functions.
432  */
433 #ifdef _LIBRADIUS
434 void            fr_strerror_printf(const char *, ...)
435 #ifdef __GNUC__
436                 __attribute__ ((format (printf, 1, 2)))
437 #endif
438 ;
439 #endif
440 void            fr_perror(const char *, ...)
441 #ifdef __GNUC__
442                 __attribute__ ((format (printf, 1, 2)))
443 #endif
444 ;
445 extern const char *fr_strerror(void);
446 extern int      fr_dns_lookups; /* 0 = no dns lookups */
447 extern int      fr_debug_flag;  /* 0 = no debugging information */
448 extern int      fr_max_attributes; /* per incoming packet */
449 #define FR_MAX_PACKET_CODE (52)
450 extern const char *fr_packet_codes[FR_MAX_PACKET_CODE];
451 extern FILE     *fr_log_fp;
452 extern void rad_print_hex(RADIUS_PACKET *packet);
453 void            fr_printf_log(const char *, ...)
454 #ifdef __GNUC__
455                 __attribute__ ((format (printf, 1, 2)))
456 #endif
457 ;
458
459 /*
460  *      Several handy miscellaneous functions.
461  */
462 const char *    ip_ntoa(char *, uint32_t);
463 char            *ifid_ntoa(char *buffer, size_t size, const uint8_t *ifid);
464 uint8_t         *ifid_aton(const char *ifid_str, uint8_t *ifid);
465 int             rad_lockfd(int fd, int lock_len);
466 int             rad_lockfd_nonblock(int fd, int lock_len);
467 int             rad_unlockfd(int fd, int lock_len);
468 void            fr_bin2hex(const uint8_t *bin, char *hex, size_t len);
469 size_t          fr_hex2bin(const char *hex, uint8_t *bin, size_t len);
470 #ifndef HAVE_INET_PTON
471 int             inet_pton(int af, const char *src, void *dst);
472 #endif
473 #ifndef HAVE_INET_NTOP
474 const char      *inet_ntop(int af, const void *src, char *dst, size_t cnt);
475 #endif
476 #ifndef HAVE_CLOSEFROM
477 int             closefrom(int fd);
478 #endif
479 int fr_ipaddr_cmp(const fr_ipaddr_t *a, const fr_ipaddr_t *b);
480
481 int             ip_hton(const char *src, int af, fr_ipaddr_t *dst);
482 const char      *ip_ntoh(const fr_ipaddr_t *src, char *dst, size_t cnt);
483 int fr_ipaddr2sockaddr(const fr_ipaddr_t *ipaddr, int port,
484                        struct sockaddr_storage *sa, socklen_t *salen);
485 int fr_sockaddr2ipaddr(const struct sockaddr_storage *sa, socklen_t salen,
486                        fr_ipaddr_t *ipaddr, int * port);
487
488
489 #ifdef ASCEND_BINARY
490 /* filters.c */
491 int             ascend_parse_filter(VALUE_PAIR *pair);
492 void            print_abinary(const VALUE_PAIR *vp, char *buffer, size_t len);
493 #endif /*ASCEND_BINARY*/
494
495 /* random numbers in isaac.c */
496 /* context of random number generator */
497 typedef struct fr_randctx {
498   uint32_t randcnt;
499   uint32_t randrsl[256];
500   uint32_t randmem[256];
501   uint32_t randa;
502   uint32_t randb;
503   uint32_t randc;
504 } fr_randctx;
505
506 void fr_isaac(fr_randctx *ctx);
507 void fr_randinit(fr_randctx *ctx, int flag);
508 uint32_t fr_rand(void); /* like rand(), but better. */
509 void fr_rand_seed(const void *, size_t ); /* seed the random pool */
510
511
512 /* crypt wrapper from crypt.c */
513 int fr_crypt_check(const char *key, const char *salt);
514
515 /* rbtree.c */
516 typedef struct rbtree_t rbtree_t;
517 typedef struct rbnode_t rbnode_t;
518
519 rbtree_t       *rbtree_create(int (*Compare)(const void *, const void *),
520                                void (*freeNode)(void *),
521                                int replace_flag);
522 void            rbtree_free(rbtree_t *tree);
523 int             rbtree_insert(rbtree_t *tree, void *Data);
524 rbnode_t        *rbtree_insertnode(rbtree_t *tree, void *Data);
525 void            rbtree_delete(rbtree_t *tree, rbnode_t *Z);
526 int             rbtree_deletebydata(rbtree_t *tree, const void *data);
527 rbnode_t       *rbtree_find(rbtree_t *tree, const void *Data);
528 void           *rbtree_finddata(rbtree_t *tree, const void *Data);
529 int             rbtree_num_elements(rbtree_t *tree);
530 void           *rbtree_min(rbtree_t *tree);
531 void           *rbtree_node2data(rbtree_t *tree, rbnode_t *node);
532
533 /* callback order for walking  */
534 typedef enum { PreOrder, InOrder, PostOrder } RBTREE_ORDER;
535
536 /*
537  *      The callback should be declared as:
538  *      int callback(void *context, void *data)
539  *
540  *      The "context" is some user-defined context.
541  *      The "data" is the pointer to the user data in the node,
542  *        NOT the node itself.
543  *
544  *      It should return 0 if all is OK, and !0 for any error.
545  *      The walking will stop on any error.
546  */
547 int rbtree_walk(rbtree_t *tree, RBTREE_ORDER order, int (*callback)(void *, void *), void *context);
548
549 /*
550  *      FIFOs
551  */
552 typedef struct fr_fifo_t fr_fifo_t;
553 typedef void (*fr_fifo_free_t)(void *);
554 fr_fifo_t *fr_fifo_create(int max_entries, fr_fifo_free_t freeNode);
555 void fr_fifo_free(fr_fifo_t *fi);
556 int fr_fifo_push(fr_fifo_t *fi, void *data);
557 void *fr_fifo_pop(fr_fifo_t *fi);
558 void *fr_fifo_peek(fr_fifo_t *fi);
559 int fr_fifo_num_elements(fr_fifo_t *fi);
560
561 #ifdef __cplusplus
562 }
563 #endif
564
565 #include <freeradius-devel/packet.h>
566
567 #ifdef WITH_TCP
568 #include <freeradius-devel/tcp.h>
569 #endif
570
571 #endif /*LIBRADIUS_H*/