Remove "hash" from RADIUS_PACKET
[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         struct value_pair       *next;
170
171         /*
172          *      Pack 4 32-bit fields together.  Saves ~8 bytes per struct
173          *      on 64-bit machines.
174          */
175         unsigned int            attribute;
176         unsigned int            vendor;
177         int                     type;
178 #ifdef __cplusplus
179         /*
180          *      C++ hackery.  The server and modules are all C, so
181          *      the defs here don't affect them.  But any C++ code
182          *      gets excited over "operator", so we change the name.
183          */
184         FR_TOKEN                op_token;
185 #else
186         FR_TOKEN                operator;
187 #endif
188
189         ATTR_FLAGS              flags;
190
191         size_t                  length; /* of data field */
192         VALUE_PAIR_DATA         data;
193 } VALUE_PAIR;
194 #define vp_strvalue   data.strvalue
195 #define vp_octets     data.octets
196 #define vp_ipv6addr   data.ipv6addr
197 #define vp_ifid       data.ifid
198 #define vp_ipv6prefix data.ipv6prefix
199 #define vp_filter     data.filter
200 #define vp_ether      data.ether
201 #define vp_signed     data.sinteger
202 #define vp_tlv        data.tlv
203 #define vp_integer64  data.integer64
204 #define vp_ipaddr     data.ipaddr.s_addr
205 #define vp_date       data.date
206 #define vp_integer    data.integer
207
208 typedef struct fr_ipaddr_t {
209         int             af;     /* address family */
210         union {
211                 struct in_addr  ip4addr;
212                 struct in6_addr ip6addr; /* maybe defined in missing.h */
213         } ipaddr;
214         uint32_t        scope;  /* for IPv6 */
215 } fr_ipaddr_t;
216
217 /*
218  *      vector:         Request authenticator from access-request packet
219  *                      Put in there by rad_decode, and must be put in the
220  *                      response RADIUS_PACKET as well before calling rad_send
221  *
222  *      verified:       Filled in by rad_decode for accounting-request packets
223  *
224  *      data,data_len:  Used between rad_recv and rad_decode.
225  */
226 typedef struct radius_packet {
227         int                     sockfd;
228         fr_ipaddr_t             src_ipaddr;
229         fr_ipaddr_t             dst_ipaddr;
230         uint16_t                src_port;
231         uint16_t                dst_port;
232         int                     id;
233         unsigned int            code;
234         uint8_t                 vector[AUTH_VECTOR_LEN];
235         struct timeval          timestamp;
236         uint8_t                 *data;
237         ssize_t                 data_len;
238         VALUE_PAIR              *vps;
239         ssize_t                 offset;
240 #ifdef WITH_TCP
241         ssize_t                 partial;
242 #endif
243 } RADIUS_PACKET;
244
245 /*
246  *      Printing functions.
247  */
248 int             fr_utf8_char(const uint8_t *str);
249 size_t          fr_print_string(const char *in, size_t inlen,
250                                  char *out, size_t outlen);
251 int             vp_prints_value(char *out, size_t outlen,
252                                 const VALUE_PAIR *vp, int delimitst);
253 int             vp_prints_value_json(char *out, size_t outlen,
254                                 const VALUE_PAIR *vp);
255 size_t          vp_print_name(char *buffer, size_t bufsize,
256                                unsigned int attr, unsigned int vendor);
257 int             vp_prints(char *out, size_t outlen, const VALUE_PAIR *vp);
258 void            vp_print(FILE *, const VALUE_PAIR *);
259 void            vp_printlist(FILE *, const VALUE_PAIR *);
260 #define         fprint_attr_val vp_print
261
262 /*
263  *      Dictionary functions.
264  */
265 int             dict_str2oid(const char *ptr, unsigned int *pattr,
266                              int vendor, int tlv_depth);
267 int             dict_addvendor(const char *name, unsigned int value);
268 int             dict_addattr(const char *name, int attr, unsigned int vendor, int type, ATTR_FLAGS flags);
269 int             dict_addvalue(const char *namestr, const char *attrstr, int value);
270 int             dict_init(const char *dir, const char *fn);
271 void            dict_free(void);
272 DICT_ATTR       *dict_attrbyvalue(unsigned int attr, unsigned int vendor);
273 DICT_ATTR       *dict_attrbyname(const char *attr);
274 DICT_VALUE      *dict_valbyattr(unsigned int attr, unsigned int vendor, int val);
275 DICT_VALUE      *dict_valbyname(unsigned int attr, unsigned int vendor, const char *val);
276 const char      *dict_valnamebyattr(unsigned int attr, unsigned int vendor, int value);
277 int             dict_vendorbyname(const char *name);
278 DICT_VENDOR     *dict_vendorbyvalue(int vendor);
279
280 #if 1 /* FIXME: compat */
281 #define dict_attrget    dict_attrbyvalue
282 #define dict_attrfind   dict_attrbyname
283 #define dict_valfind    dict_valbyname
284 /*#define dict_valget   dict_valbyattr almost but not quite*/
285 #endif
286
287 /* get around diffrent ctime_r styles */
288 #ifdef CTIMERSTYLE
289 #if CTIMERSTYLE == SOLARISSTYLE
290 #define CTIME_R(a,b,c) ctime_r(a,b,c)
291 #else
292 #define CTIME_R(a,b,c) ctime_r(a,b)
293 #endif
294 #else
295 #define CTIME_R(a,b,c) ctime_r(a,b)
296 #endif
297
298 /* md5.c */
299
300 void            fr_md5_calc(uint8_t *, const uint8_t *, unsigned int);
301
302 /* hmac.c */
303
304 void fr_hmac_md5(const uint8_t *text, int text_len,
305                    const uint8_t *key, int key_len,
306                    unsigned char *digest);
307
308 /* hmacsha1.c */
309
310 void fr_hmac_sha1(const uint8_t *text, int text_len,
311                     const uint8_t *key, int key_len,
312                     uint8_t *digest);
313
314 /* radius.c */
315 int             rad_send(RADIUS_PACKET *, const RADIUS_PACKET *, const char *secret);
316 int             rad_packet_ok(RADIUS_PACKET *packet, int flags);
317 RADIUS_PACKET   *rad_recv(int fd, int flags);
318 ssize_t rad_recv_header(int sockfd, fr_ipaddr_t *src_ipaddr, int *src_port,
319                         int *code);
320 void            rad_recv_discard(int sockfd);
321 int             rad_verify(RADIUS_PACKET *packet, RADIUS_PACKET *original,
322                            const char *secret);
323 int             rad_decode(RADIUS_PACKET *packet, RADIUS_PACKET *original, const char *secret);
324 int             rad_encode(RADIUS_PACKET *packet, const RADIUS_PACKET *original,
325                            const char *secret);
326 int             rad_sign(RADIUS_PACKET *packet, const RADIUS_PACKET *original,
327                          const char *secret);
328
329 int rad_digest_cmp(const uint8_t *a, const uint8_t *b, size_t length);
330 RADIUS_PACKET   *rad_alloc(int newvector);
331 RADIUS_PACKET   *rad_alloc_reply(RADIUS_PACKET *);
332 void            rad_free(RADIUS_PACKET **);
333 int             rad_pwencode(char *encpw, size_t *len, const char *secret,
334                              const uint8_t *vector);
335 int             rad_pwdecode(char *encpw, size_t len, const char *secret,
336                              const uint8_t *vector);
337 int             rad_tunnel_pwencode(char *encpw, size_t *len, const char *secret,
338                                     const uint8_t *vector);
339 int             rad_tunnel_pwdecode(uint8_t *encpw, size_t *len,
340                                     const char *secret, const uint8_t *vector);
341 int             rad_chap_encode(RADIUS_PACKET *packet, uint8_t *output,
342                                 int id, VALUE_PAIR *password);
343
344 int rad_attr_ok(const RADIUS_PACKET *packet, const RADIUS_PACKET *original,
345                 DICT_ATTR *da,
346                 const uint8_t *data, size_t length);
347 int rad_tlv_ok(const uint8_t *data, size_t length,
348                size_t dv_type, size_t dv_length);
349
350 ssize_t rad_attr2vp_raw(const RADIUS_PACKET *packet,
351                         const RADIUS_PACKET *original,
352                         const char *secret,
353                         const uint8_t *data, size_t length,
354                         VALUE_PAIR **pvp);
355 ssize_t rad_attr2vp_extended(const RADIUS_PACKET *packet,
356                              const RADIUS_PACKET *original,
357                              const char *secret,
358                              const uint8_t *start, size_t length,
359                              VALUE_PAIR **pvp);
360 ssize_t rad_attr2vp_wimax(const RADIUS_PACKET *packet,
361                           const RADIUS_PACKET *original,
362                           const char *secret,
363                           const uint8_t *data, size_t length,
364                           VALUE_PAIR **pvp);
365
366 ssize_t rad_attr2vp_vsa(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 ssize_t rad_attr2vp_rfc(const RADIUS_PACKET *packet,
372                         const RADIUS_PACKET *original,
373                         const char *secret,
374                         const uint8_t *data, size_t length,
375                         VALUE_PAIR **pvp);
376
377 ssize_t         rad_attr2vp(const RADIUS_PACKET *packet, const RADIUS_PACKET *original,
378                             const char *secret,
379                             const uint8_t *data, size_t length,
380                             VALUE_PAIR **pvp);
381
382 int rad_vp2extended(const RADIUS_PACKET *packet,
383                     const RADIUS_PACKET *original,
384                     const char *secret, const VALUE_PAIR **pvp,
385                     uint8_t *ptr, size_t room);
386 int rad_vp2wimax(const RADIUS_PACKET *packet,
387                  const RADIUS_PACKET *original,
388                  const char *secret, const VALUE_PAIR **pvp,
389                  uint8_t *ptr, size_t room);
390 int rad_vp2vsa(const RADIUS_PACKET *packet, const RADIUS_PACKET *original,
391                const char *secret, const VALUE_PAIR **pvp, uint8_t *start,
392                size_t room);
393 int rad_vp2rfc(const RADIUS_PACKET *packet,
394                const RADIUS_PACKET *original,
395                const char *secret, const VALUE_PAIR **pvp,
396                uint8_t *ptr, size_t room);
397
398 int             rad_vp2attr(const RADIUS_PACKET *packet,
399                             const RADIUS_PACKET *original, const char *secret,
400                             const VALUE_PAIR **pvp, uint8_t *ptr, size_t room);
401
402 /* valuepair.c */
403 VALUE_PAIR      *pairalloc(DICT_ATTR *da);
404 VALUE_PAIR      *paircreate_raw(int attr, int vendor, int type, VALUE_PAIR *);
405 VALUE_PAIR      *paircreate(int attr, int vendor, int type);
406 void            pairfree(VALUE_PAIR **);
407 void            pairbasicfree(VALUE_PAIR *pair);
408 VALUE_PAIR      *pairfind(VALUE_PAIR *, unsigned int attr, unsigned int vendor);
409 void            pairdelete(VALUE_PAIR **, unsigned int attr, unsigned int vendor);
410 void            pairadd(VALUE_PAIR **, VALUE_PAIR *);
411 void            pairreplace(VALUE_PAIR **first, VALUE_PAIR *add);
412 int             paircmp(VALUE_PAIR *check, VALUE_PAIR *data);
413 VALUE_PAIR      *paircopyvp(const VALUE_PAIR *vp);
414 VALUE_PAIR      *paircopy(VALUE_PAIR *vp);
415 VALUE_PAIR      *paircopy2(VALUE_PAIR *vp, unsigned int attr, unsigned int vendor);
416 void            pairmove(VALUE_PAIR **to, VALUE_PAIR **from);
417 void            pairmove2(VALUE_PAIR **to, VALUE_PAIR **from, unsigned int attr, unsigned int vendor);
418 VALUE_PAIR      *pairparsevalue(VALUE_PAIR *vp, const char *value);
419 VALUE_PAIR      *pairmake(const char *attribute, const char *value, int operator);
420 VALUE_PAIR *pairmake_xlat(const char *attribute, const char *value, int operator);
421 VALUE_PAIR      *pairread(const char **ptr, FR_TOKEN *eol);
422 FR_TOKEN        userparse(const char *buffer, VALUE_PAIR **first_pair);
423 VALUE_PAIR     *readvp2(FILE *fp, int *pfiledone, const char *errprefix);
424
425 /*
426  *      Error functions.
427  */
428 #ifdef _LIBRADIUS
429 void            fr_strerror_printf(const char *, ...)
430 #ifdef __GNUC__
431                 __attribute__ ((format (printf, 1, 2)))
432 #endif
433 ;
434 #endif
435 void            fr_perror(const char *, ...)
436 #ifdef __GNUC__
437                 __attribute__ ((format (printf, 1, 2)))
438 #endif
439 ;
440 extern const char *fr_strerror(void);
441 extern int      fr_dns_lookups; /* 0 = no dns lookups */
442 extern int      fr_debug_flag;  /* 0 = no debugging information */
443 extern int      fr_max_attributes; /* per incoming packet */
444 #define FR_MAX_PACKET_CODE (52)
445 extern const char *fr_packet_codes[FR_MAX_PACKET_CODE];
446 extern FILE     *fr_log_fp;
447 extern void rad_print_hex(RADIUS_PACKET *packet);
448 void            fr_printf_log(const char *, ...)
449 #ifdef __GNUC__
450                 __attribute__ ((format (printf, 1, 2)))
451 #endif
452 ;
453
454 /*
455  *      Several handy miscellaneous functions.
456  */
457 const char *    ip_ntoa(char *, uint32_t);
458 char            *ifid_ntoa(char *buffer, size_t size, const uint8_t *ifid);
459 uint8_t         *ifid_aton(const char *ifid_str, uint8_t *ifid);
460 int             rad_lockfd(int fd, int lock_len);
461 int             rad_lockfd_nonblock(int fd, int lock_len);
462 int             rad_unlockfd(int fd, int lock_len);
463 void            fr_bin2hex(const uint8_t *bin, char *hex, size_t len);
464 size_t          fr_hex2bin(const char *hex, uint8_t *bin, size_t len);
465 #ifndef HAVE_INET_PTON
466 int             inet_pton(int af, const char *src, void *dst);
467 #endif
468 #ifndef HAVE_INET_NTOP
469 const char      *inet_ntop(int af, const void *src, char *dst, size_t cnt);
470 #endif
471 #ifndef HAVE_CLOSEFROM
472 int             closefrom(int fd);
473 #endif
474 int fr_ipaddr_cmp(const fr_ipaddr_t *a, const fr_ipaddr_t *b);
475
476 int             ip_hton(const char *src, int af, fr_ipaddr_t *dst);
477 const char      *ip_ntoh(const fr_ipaddr_t *src, char *dst, size_t cnt);
478 int fr_ipaddr2sockaddr(const fr_ipaddr_t *ipaddr, int port,
479                        struct sockaddr_storage *sa, socklen_t *salen);
480 int fr_sockaddr2ipaddr(const struct sockaddr_storage *sa, socklen_t salen,
481                        fr_ipaddr_t *ipaddr, int * port);
482
483
484 #ifdef ASCEND_BINARY
485 /* filters.c */
486 int             ascend_parse_filter(VALUE_PAIR *pair);
487 void            print_abinary(const VALUE_PAIR *vp, char *buffer, size_t len);
488 #endif /*ASCEND_BINARY*/
489
490 /* random numbers in isaac.c */
491 /* context of random number generator */
492 typedef struct fr_randctx {
493   uint32_t randcnt;
494   uint32_t randrsl[256];
495   uint32_t randmem[256];
496   uint32_t randa;
497   uint32_t randb;
498   uint32_t randc;
499 } fr_randctx;
500
501 void fr_isaac(fr_randctx *ctx);
502 void fr_randinit(fr_randctx *ctx, int flag);
503 uint32_t fr_rand(void); /* like rand(), but better. */
504 void fr_rand_seed(const void *, size_t ); /* seed the random pool */
505
506
507 /* crypt wrapper from crypt.c */
508 int fr_crypt_check(const char *key, const char *salt);
509
510 /* rbtree.c */
511 typedef struct rbtree_t rbtree_t;
512 typedef struct rbnode_t rbnode_t;
513
514 rbtree_t       *rbtree_create(int (*Compare)(const void *, const void *),
515                                void (*freeNode)(void *),
516                                int replace_flag);
517 void            rbtree_free(rbtree_t *tree);
518 int             rbtree_insert(rbtree_t *tree, void *Data);
519 rbnode_t        *rbtree_insertnode(rbtree_t *tree, void *Data);
520 void            rbtree_delete(rbtree_t *tree, rbnode_t *Z);
521 int             rbtree_deletebydata(rbtree_t *tree, const void *data);
522 rbnode_t       *rbtree_find(rbtree_t *tree, const void *Data);
523 void           *rbtree_finddata(rbtree_t *tree, const void *Data);
524 int             rbtree_num_elements(rbtree_t *tree);
525 void           *rbtree_min(rbtree_t *tree);
526 void           *rbtree_node2data(rbtree_t *tree, rbnode_t *node);
527
528 /* callback order for walking  */
529 typedef enum { PreOrder, InOrder, PostOrder } RBTREE_ORDER;
530
531 /*
532  *      The callback should be declared as:
533  *      int callback(void *context, void *data)
534  *
535  *      The "context" is some user-defined context.
536  *      The "data" is the pointer to the user data in the node,
537  *        NOT the node itself.
538  *
539  *      It should return 0 if all is OK, and !0 for any error.
540  *      The walking will stop on any error.
541  */
542 int rbtree_walk(rbtree_t *tree, RBTREE_ORDER order, int (*callback)(void *, void *), void *context);
543
544 /*
545  *      FIFOs
546  */
547 typedef struct fr_fifo_t fr_fifo_t;
548 typedef void (*fr_fifo_free_t)(void *);
549 fr_fifo_t *fr_fifo_create(int max_entries, fr_fifo_free_t freeNode);
550 void fr_fifo_free(fr_fifo_t *fi);
551 int fr_fifo_push(fr_fifo_t *fi, void *data);
552 void *fr_fifo_pop(fr_fifo_t *fi);
553 void *fr_fifo_peek(fr_fifo_t *fi);
554 int fr_fifo_num_elements(fr_fifo_t *fi);
555
556 #ifdef __cplusplus
557 }
558 #endif
559
560 #include <freeradius-devel/packet.h>
561
562 #ifdef WITH_TCP
563 #include <freeradius-devel/tcp.h>
564 #endif
565
566 #endif /*LIBRADIUS_H*/