OXIESEC PANEL
- Current Dir:
/
/
usr
/
include
Server IP: 2a02:4780:11:1084:0:327f:3464:10
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
03/16/2023 11:26:16 AM
rwxr-xr-x
📄
GeoIP.h
17.42 KB
01/17/2018 07:23:18 PM
rw-r--r--
📄
GeoIPCity.h
2.24 KB
01/17/2018 07:23:18 PM
rw-r--r--
📄
a.out.h
4.25 KB
01/28/2025 02:29:06 AM
rw-r--r--
📄
aio.h
7.28 KB
01/28/2025 02:29:29 AM
rw-r--r--
📄
aliases.h
1.98 KB
01/28/2025 02:29:30 AM
rw-r--r--
📄
alloca.h
1.17 KB
01/28/2025 02:29:03 AM
rw-r--r--
📄
ar.h
1.69 KB
01/28/2025 02:29:06 AM
rw-r--r--
📄
argp.h
24.82 KB
01/28/2025 02:29:29 AM
rw-r--r--
📄
argz.h
5.91 KB
01/28/2025 02:29:05 AM
rw-r--r--
📁
arpa
-
02/08/2025 12:05:41 AM
rwxr-xr-x
📁
asm
-
02/07/2025 07:47:47 PM
rwxr-xr-x
📁
asm-generic
-
02/07/2025 07:47:47 PM
rwxr-xr-x
📄
assert.h
4.45 KB
01/28/2025 02:29:00 AM
rw-r--r--
📁
bits
-
02/08/2025 12:05:41 AM
rwxr-xr-x
📁
bsock
-
03/16/2023 01:30:08 PM
rwxr-xr-x
📄
byteswap.h
1.37 KB
01/28/2025 02:29:05 AM
rw-r--r--
📁
c++
-
10/21/2025 06:53:52 AM
rwxr-xr-x
📄
com_err.h
2.07 KB
03/21/2020 04:24:04 AM
rw-r--r--
📄
complex.h
7 KB
01/28/2025 02:29:02 AM
rw-r--r--
📄
cpio.h
2.21 KB
01/28/2025 02:29:06 AM
rw-r--r--
📄
cpuidle.h
844 bytes
01/09/2025 04:53:16 PM
rw-r--r--
📁
criu
-
03/16/2023 01:51:56 PM
rwxr-xr-x
📄
crypt.h
8.9 KB
10/09/2021 04:04:04 AM
rw-r--r--
📄
ctype.h
10.71 KB
01/28/2025 02:29:00 AM
rw-r--r--
📁
curl
-
10/21/2025 06:53:50 AM
rwxr-xr-x
📄
dirent.h
12.19 KB
01/28/2025 02:29:06 AM
rw-r--r--
📄
dlfcn.h
7.07 KB
01/28/2025 02:29:04 AM
rw-r--r--
📁
drm
-
02/07/2025 07:47:47 PM
rwxr-xr-x
📄
elf.h
170.73 KB
01/28/2025 02:29:32 AM
rw-r--r--
📄
endian.h
3.11 KB
01/28/2025 02:29:05 AM
rw-r--r--
📄
envz.h
2.8 KB
01/28/2025 02:29:05 AM
rw-r--r--
📄
err.h
2.16 KB
01/28/2025 02:29:06 AM
rw-r--r--
📄
errno.h
1.64 KB
01/28/2025 02:29:03 AM
rw-r--r--
📄
error.h
1.99 KB
01/28/2025 02:29:06 AM
rw-r--r--
📁
et
-
10/21/2025 06:53:50 AM
rwxr-xr-x
📄
execinfo.h
1.49 KB
01/28/2025 02:29:29 AM
rw-r--r--
📄
fcntl.h
10.7 KB
01/28/2025 02:29:06 AM
rw-r--r--
📄
features.h
15.69 KB
01/28/2025 02:28:54 AM
rw-r--r--
📄
fenv.h
5.72 KB
01/28/2025 02:29:02 AM
rw-r--r--
📁
finclude
-
02/08/2025 12:05:41 AM
rwxr-xr-x
📄
fmtmsg.h
3.16 KB
01/28/2025 02:29:03 AM
rw-r--r--
📄
fnmatch.h
2.24 KB
01/28/2025 02:29:06 AM
rw-r--r--
📄
fpu_control.h
3.5 KB
01/28/2025 02:29:02 AM
rw-r--r--
📄
fstab.h
3.04 KB
01/28/2025 02:29:06 AM
rw-r--r--
📄
fts.h
8.18 KB
01/28/2025 02:29:06 AM
rw-r--r--
📄
ftw.h
5.13 KB
01/28/2025 02:29:06 AM
rw-r--r--
📄
gconv.h
4.31 KB
01/28/2025 02:28:54 AM
rw-r--r--
📁
gdb
-
09/21/2024 07:48:36 PM
rwxr-xr-x
📄
getopt.h
1.43 KB
01/28/2025 02:29:06 AM
rw-r--r--
📄
glob.h
6.46 KB
01/28/2025 02:29:06 AM
rw-r--r--
📁
gnu
-
02/08/2025 12:05:41 AM
rwxr-xr-x
📄
gnu-versions.h
2.29 KB
01/28/2025 02:28:54 AM
rw-r--r--
📄
gnumake.h
2.84 KB
04/18/2022 04:38:33 PM
rw-r--r--
📄
grp.h
6.53 KB
01/28/2025 02:29:06 AM
rw-r--r--
📄
gshadow.h
4.42 KB
01/28/2025 02:29:28 AM
rw-r--r--
📁
gssapi
-
10/21/2025 06:53:50 AM
rwxr-xr-x
📄
gssapi.h
181 bytes
11/05/2024 02:15:08 AM
rw-r--r--
📁
gssrpc
-
10/21/2025 06:53:50 AM
rwxr-xr-x
📄
iconv.h
1.81 KB
01/28/2025 02:28:54 AM
rw-r--r--
📄
ieee754.h
4.79 KB
01/28/2025 02:29:02 AM
rw-r--r--
📄
ifaddrs.h
2.77 KB
01/28/2025 02:29:30 AM
rw-r--r--
📄
inttypes.h
11.61 KB
01/28/2025 02:29:03 AM
rw-r--r--
📁
kadm5
-
10/21/2025 06:53:50 AM
rwxr-xr-x
📄
kdb.h
67.66 KB
11/05/2024 02:15:08 AM
rw-r--r--
📄
keyutils.h
7.52 KB
10/08/2021 01:50:54 PM
rw-r--r--
📄
krad.h
8.72 KB
11/05/2024 02:15:08 AM
rw-r--r--
📁
krb5
-
10/21/2025 06:53:50 AM
rwxr-xr-x
📄
krb5.h
402 bytes
11/05/2024 02:15:08 AM
rw-r--r--
📄
langinfo.h
17.43 KB
01/28/2025 02:28:54 AM
rw-r--r--
📄
lastlog.h
126 bytes
01/28/2025 02:29:32 AM
rw-r--r--
📄
lauxlib.h
8.43 KB
10/09/2021 05:14:36 AM
rw-r--r--
📄
libgen.h
1.35 KB
01/28/2025 02:29:06 AM
rw-r--r--
📄
libintl.h
4.47 KB
01/28/2025 02:29:00 AM
rw-r--r--
📄
liblsapi-sha1.h
569 bytes
12/26/2024 12:07:02 PM
rw-r--r--
📁
libxml2
-
06/05/2024 02:22:22 PM
rwxr-xr-x
📄
limits.h
5.29 KB
01/28/2025 02:28:54 AM
rw-r--r--
📄
link.h
7.05 KB
01/28/2025 02:29:32 AM
rw-r--r--
📁
linux
-
02/07/2025 07:47:47 PM
rwxr-xr-x
📄
locale.h
7.49 KB
01/28/2025 02:28:54 AM
rw-r--r--
📄
lsapidef.h
4.6 KB
12/26/2024 12:07:02 PM
rw-r--r--
📄
lscapi.h
24.21 KB
12/26/2024 12:07:02 PM
rw-r--r--
📄
lscapi_config.h
599 bytes
12/26/2024 12:07:02 PM
rw-r--r--
📄
lua.h
14.49 KB
10/09/2021 05:14:36 AM
rw-r--r--
📄
lua.hpp
191 bytes
10/09/2021 05:14:36 AM
rw-r--r--
📄
luaconf-x86_64.h
21.11 KB
10/09/2021 05:14:36 AM
rw-r--r--
📄
luaconf.h
1.62 KB
08/18/2021 01:25:50 PM
rw-r--r--
📄
lualib.h
1.27 KB
10/09/2021 05:14:36 AM
rw-r--r--
📁
lzma
-
03/16/2023 01:46:30 PM
rwxr-xr-x
📄
lzma.h
9.59 KB
04/29/2018 03:10:38 PM
rw-r--r--
📄
malloc.h
5.96 KB
01/28/2025 02:29:05 AM
rw-r--r--
📄
math.h
52.07 KB
01/28/2025 02:29:02 AM
rw-r--r--
📄
mcheck.h
2.38 KB
01/28/2025 02:29:05 AM
rw-r--r--
📄
memory.h
955 bytes
01/28/2025 02:29:05 AM
rw-r--r--
📁
misc
-
02/07/2025 07:47:47 PM
rwxr-xr-x
📄
mntent.h
3.28 KB
01/28/2025 02:29:06 AM
rw-r--r--
📄
monetary.h
1.76 KB
01/28/2025 02:29:03 AM
rw-r--r--
📄
mqueue.h
3.67 KB
01/28/2025 02:29:29 AM
rw-r--r--
📁
mtd
-
02/07/2025 07:47:47 PM
rwxr-xr-x
📁
mysql
-
07/04/2024 10:47:16 PM
rwxr-xr-x
📁
net
-
02/08/2025 12:05:41 AM
rwxr-xr-x
📁
netash
-
02/08/2025 12:05:41 AM
rwxr-xr-x
📁
netatalk
-
02/08/2025 12:05:41 AM
rwxr-xr-x
📁
netax25
-
02/08/2025 12:05:41 AM
rwxr-xr-x
📄
netdb.h
27.44 KB
01/28/2025 02:29:30 AM
rw-r--r--
📁
neteconet
-
02/08/2025 12:05:41 AM
rwxr-xr-x
📁
netinet
-
02/08/2025 12:05:41 AM
rwxr-xr-x
📁
netipx
-
02/08/2025 12:05:41 AM
rwxr-xr-x
📁
netiucv
-
02/08/2025 12:05:41 AM
rwxr-xr-x
📁
netpacket
-
02/08/2025 12:05:41 AM
rwxr-xr-x
📁
netrom
-
02/08/2025 12:05:41 AM
rwxr-xr-x
📁
netrose
-
02/08/2025 12:05:41 AM
rwxr-xr-x
📁
nfs
-
02/08/2025 12:05:41 AM
rwxr-xr-x
📄
nl_types.h
1.71 KB
01/28/2025 02:29:00 AM
rw-r--r--
📄
nss.h
1.83 KB
01/28/2025 02:29:31 AM
rw-r--r--
📄
obstack.h
20.81 KB
01/28/2025 02:29:05 AM
rw-r--r--
📁
openssl
-
10/21/2025 06:53:50 AM
rwxr-xr-x
📄
paths.h
2.91 KB
01/28/2025 02:29:06 AM
rw-r--r--
📄
pcre2.h
43.75 KB
08/02/2022 04:07:28 PM
rw-r--r--
📄
pcre2posix.h
5.67 KB
08/02/2022 04:07:28 PM
rw-r--r--
📁
perf
-
02/07/2025 07:47:47 PM
rwxr-xr-x
📄
poll.h
22 bytes
01/28/2025 02:29:06 AM
rw-r--r--
📄
printf.h
6.64 KB
01/28/2025 02:29:03 AM
rw-r--r--
📄
proc_service.h
3.39 KB
01/28/2025 02:29:30 AM
rw-r--r--
📄
profile.h
11.87 KB
11/05/2024 02:15:08 AM
rw-r--r--
📁
protocols
-
02/08/2025 12:05:41 AM
rwxr-xr-x
📄
pthread.h
40.3 KB
01/28/2025 02:29:04 AM
rw-r--r--
📄
pty.h
1.53 KB
01/28/2025 02:29:32 AM
rw-r--r--
📄
pwd.h
6.01 KB
01/28/2025 02:29:06 AM
rw-r--r--
📁
python2.7
-
02/16/2024 09:01:03 PM
rwxr-xr-x
📁
python3.6m
-
04/17/2025 10:53:39 AM
rwxr-xr-x
📁
python3.8
-
10/21/2025 06:53:51 AM
rwxr-xr-x
📁
rdma
-
02/07/2025 07:47:47 PM
rwxr-xr-x
📄
re_comp.h
962 bytes
01/28/2025 02:29:06 AM
rw-r--r--
📄
regex.h
24.14 KB
01/28/2025 02:29:06 AM
rw-r--r--
📄
regexp.h
1.41 KB
01/28/2025 02:29:06 AM
rw-r--r--
📄
resolv.h
11.79 KB
01/28/2025 02:29:30 AM
rw-r--r--
📁
rpc
-
02/08/2025 12:05:41 AM
rwxr-xr-x
📄
sched.h
4.62 KB
01/28/2025 02:29:06 AM
rw-r--r--
📁
scsi
-
02/08/2025 12:05:41 AM
rwxr-xr-x
📄
search.h
5.1 KB
01/28/2025 02:29:06 AM
rw-r--r--
📁
selinux
-
10/21/2025 06:53:50 AM
rwxr-xr-x
📄
semaphore.h
2.34 KB
01/28/2025 02:29:04 AM
rw-r--r--
📁
sepol
-
10/21/2025 06:53:50 AM
rwxr-xr-x
📄
setjmp.h
3.58 KB
01/28/2025 02:29:03 AM
rw-r--r--
📄
sgtty.h
1.31 KB
01/28/2025 02:29:06 AM
rw-r--r--
📄
sha1.h
569 bytes
11/22/2023 05:32:55 PM
rw-r--r--
📄
shadow.h
5.34 KB
01/28/2025 02:29:28 AM
rw-r--r--
📄
signal.h
11.96 KB
01/28/2025 02:29:03 AM
rw-r--r--
📁
sound
-
02/07/2025 07:47:47 PM
rwxr-xr-x
📄
spawn.h
6.53 KB
01/28/2025 02:29:06 AM
rw-r--r--
📄
stab.h
264 bytes
01/28/2025 02:29:06 AM
rw-r--r--
📄
stdc-predef.h
2.24 KB
01/28/2025 02:28:54 AM
rw-r--r--
📄
stdint.h
8.27 KB
01/28/2025 02:29:03 AM
rw-r--r--
📄
stdio.h
29.46 KB
01/28/2025 02:29:04 AM
rw-r--r--
📄
stdio_ext.h
2.73 KB
01/28/2025 02:29:03 AM
rw-r--r--
📄
stdlib.h
34.82 KB
01/28/2025 02:29:03 AM
rw-r--r--
📄
string.h
17.17 KB
01/28/2025 02:29:05 AM
rw-r--r--
📄
strings.h
4.64 KB
01/28/2025 02:29:05 AM
rw-r--r--
📁
sys
-
02/08/2025 12:05:41 AM
rwxr-xr-x
📄
syscall.h
25 bytes
01/28/2025 02:29:06 AM
rw-r--r--
📄
sysexits.h
5.11 KB
01/28/2025 02:29:06 AM
rw-r--r--
📄
syslog.h
24 bytes
01/28/2025 02:29:06 AM
rw-r--r--
📄
tar.h
3.7 KB
01/28/2025 02:29:06 AM
rw-r--r--
📄
termio.h
214 bytes
01/28/2025 02:29:06 AM
rw-r--r--
📄
termios.h
3.51 KB
01/28/2025 02:29:06 AM
rw-r--r--
📄
tgmath.h
30.75 KB
01/28/2025 02:29:02 AM
rw-r--r--
📄
thread_db.h
15.65 KB
01/28/2025 02:29:30 AM
rw-r--r--
📄
threads.h
6.5 KB
01/28/2025 02:29:04 AM
rw-r--r--
📄
time.h
10.12 KB
01/28/2025 02:29:05 AM
rw-r--r--
📄
ttyent.h
2.44 KB
01/28/2025 02:29:06 AM
rw-r--r--
📄
uchar.h
1.95 KB
01/28/2025 02:29:05 AM
rw-r--r--
📄
ucontext.h
1.99 KB
01/28/2025 02:29:03 AM
rw-r--r--
📄
ulimit.h
1.55 KB
01/28/2025 02:29:06 AM
rw-r--r--
📄
unistd.h
41.74 KB
01/28/2025 02:29:06 AM
rw-r--r--
📄
utime.h
1.47 KB
01/28/2025 02:29:06 AM
rw-r--r--
📄
utmp.h
3.15 KB
01/28/2025 02:29:32 AM
rw-r--r--
📄
utmpx.h
4 KB
01/28/2025 02:29:32 AM
rw-r--r--
📄
values.h
1.91 KB
01/28/2025 02:28:54 AM
rw-r--r--
📄
verto-module.h
6.48 KB
10/08/2022 07:49:42 AM
rw-r--r--
📄
verto.h
18.98 KB
10/08/2022 07:49:42 AM
rw-r--r--
📁
video
-
02/07/2025 07:47:47 PM
rwxr-xr-x
📄
wait.h
22 bytes
01/28/2025 02:29:06 AM
rw-r--r--
📄
wchar.h
30.38 KB
01/28/2025 02:29:05 AM
rw-r--r--
📄
wctype.h
5.42 KB
01/28/2025 02:29:07 AM
rw-r--r--
📄
wordexp.h
2.44 KB
01/28/2025 02:29:06 AM
rw-r--r--
📁
xen
-
02/07/2025 07:47:47 PM
rwxr-xr-x
📄
zconf.h
15.88 KB
10/11/2023 10:02:25 PM
rw-r--r--
📄
zlib.h
94 KB
10/11/2023 10:02:25 PM
rw-r--r--
Editing: krad.h
Close
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright 2013 Red Hat, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * This API is not considered as stable as the main krb5 API. * * - We may make arbitrary incompatible changes between feature releases * (e.g. from 1.12 to 1.13). * - We will make some effort to avoid making incompatible changes for * bugfix releases, but will make them if necessary. */ #ifndef KRAD_H_ #define KRAD_H_ #include <krb5.h> #include <verto.h> #include <stddef.h> #include <stdio.h> #define KRAD_PACKET_SIZE_MAX 4096 #define KRAD_SERVICE_TYPE_LOGIN 1 #define KRAD_SERVICE_TYPE_FRAMED 2 #define KRAD_SERVICE_TYPE_CALLBACK_LOGIN 3 #define KRAD_SERVICE_TYPE_CALLBACK_FRAMED 4 #define KRAD_SERVICE_TYPE_OUTBOUND 5 #define KRAD_SERVICE_TYPE_ADMINISTRATIVE 6 #define KRAD_SERVICE_TYPE_NAS_PROMPT 7 #define KRAD_SERVICE_TYPE_AUTHENTICATE_ONLY 8 #define KRAD_SERVICE_TYPE_CALLBACK_NAS_PROMPT 9 #define KRAD_SERVICE_TYPE_CALL_CHECK 10 #define KRAD_SERVICE_TYPE_CALLBACK_ADMINISTRATIVE 11 typedef struct krad_attrset_st krad_attrset; typedef struct krad_packet_st krad_packet; typedef struct krad_client_st krad_client; typedef unsigned char krad_code; typedef unsigned char krad_attr; /* Called when a response is received or the request times out. */ typedef void (*krad_cb)(krb5_error_code retval, const krad_packet *request, const krad_packet *response, void *data); /* * Called to iterate over a set of requests. Either the callback will be * called until it returns NULL, or it will be called with cancel = TRUE to * terminate in the middle of an iteration. */ typedef const krad_packet * (*krad_packet_iter_cb)(void *data, krb5_boolean cancel); /* * Code */ /* Convert a code name to its number. Only works for codes defined * by RFC 2875 or 2882. Returns 0 if the name was not found. */ krad_code krad_code_name2num(const char *name); /* Convert a code number to its name. Only works for attributes defined * by RFC 2865 or 2882. Returns NULL if the name was not found. */ const char * krad_code_num2name(krad_code code); /* * Attribute */ /* Convert an attribute name to its number. Only works for attributes defined * by RFC 2865. Returns 0 if the name was not found. */ krad_attr krad_attr_name2num(const char *name); /* Convert an attribute number to its name. Only works for attributes defined * by RFC 2865. Returns NULL if the name was not found. */ const char * krad_attr_num2name(krad_attr type); /* * Attribute set */ /* Create a new attribute set. */ krb5_error_code krad_attrset_new(krb5_context ctx, krad_attrset **set); /* Create a deep copy of an attribute set. */ krb5_error_code krad_attrset_copy(const krad_attrset *set, krad_attrset **copy); /* Free an attribute set. */ void krad_attrset_free(krad_attrset *set); /* Add an attribute to a set. */ krb5_error_code krad_attrset_add(krad_attrset *set, krad_attr type, const krb5_data *data); /* Add a four-octet unsigned number attribute to the given set. */ krb5_error_code krad_attrset_add_number(krad_attrset *set, krad_attr type, krb5_ui_4 num); /* Delete the specified attribute. */ void krad_attrset_del(krad_attrset *set, krad_attr type, size_t indx); /* Get the specified attribute. */ const krb5_data * krad_attrset_get(const krad_attrset *set, krad_attr type, size_t indx); /* * Packet */ /* Determine the bytes needed from the socket to get the whole packet. Don't * cache the return value as it can change! Returns -1 on EBADMSG. */ ssize_t krad_packet_bytes_needed(const krb5_data *buffer); /* Free a packet. */ void krad_packet_free(krad_packet *pkt); /* * Create a new request packet. * * This function takes the attributes specified in set and converts them into a * radius packet. The packet will have a randomized id. If cb is not NULL, it * will be called passing data as the argument to iterate over a set of * outstanding requests. In this case, the id will be both random and unique * across the set of requests. */ krb5_error_code krad_packet_new_request(krb5_context ctx, const char *secret, krad_code code, const krad_attrset *set, krad_packet_iter_cb cb, void *data, krad_packet **request); /* * Create a new response packet. * * This function is similar to krad_packet_new_requst() except that it crafts a * packet in response to a request packet. This new packet will borrow values * from the request such as the id and the authenticator. */ krb5_error_code krad_packet_new_response(krb5_context ctx, const char *secret, krad_code code, const krad_attrset *set, const krad_packet *request, krad_packet **response); /* * Decode a request radius packet from krb5_data. * * The resulting decoded packet will be a request packet stored in *reqpkt. * * If cb is NULL, *duppkt will always be NULL. * * If cb is not NULL, it will be called (with the data argument) to iterate * over a set of requests currently being processed. In this case, if the * packet is a duplicate of an already received request, the original request * will be set in *duppkt. */ krb5_error_code krad_packet_decode_request(krb5_context ctx, const char *secret, const krb5_data *buffer, krad_packet_iter_cb cb, void *data, const krad_packet **duppkt, krad_packet **reqpkt); /* * Decode a response radius packet from krb5_data. * * The resulting decoded packet will be a response packet stored in *rsppkt. * * If cb is NULL, *reqpkt will always be NULL. * * If cb is not NULL, it will be called (with the data argument) to iterate * over a set of requests awaiting responses. In this case, if the response * packet matches one of these requests, the original request will be set in * *reqpkt. */ krb5_error_code krad_packet_decode_response(krb5_context ctx, const char *secret, const krb5_data *buffer, krad_packet_iter_cb cb, void *data, const krad_packet **reqpkt, krad_packet **rsppkt); /* Encode packet. */ const krb5_data * krad_packet_encode(const krad_packet *pkt); /* Get the code for the given packet. */ krad_code krad_packet_get_code(const krad_packet *pkt); /* Get the specified attribute. */ const krb5_data * krad_packet_get_attr(const krad_packet *pkt, krad_attr type, size_t indx); /* * Client */ /* Create a new client. */ krb5_error_code krad_client_new(krb5_context kctx, verto_ctx *vctx, krad_client **client); /* Free the client. */ void krad_client_free(krad_client *client); /* * Send a request to a radius server. * * The remote host may be specified by one of the following formats: * - /path/to/unix.socket * - IPv4 * - IPv4:port * - IPv4:service * - [IPv6] * - [IPv6]:port * - [IPv6]:service * - hostname * - hostname:port * - hostname:service * * The timeout parameter (milliseconds) is the total timeout across all remote * hosts (when DNS returns multiple entries) and all retries. For stream * sockets, the retries parameter is ignored and no retries are performed. * * The cb function will be called with the data argument when either a response * is received or the request times out on all possible remote hosts. */ krb5_error_code krad_client_send(krad_client *rc, krad_code code, const krad_attrset *attrs, const char *remote, const char *secret, int timeout, size_t retries, krad_cb cb, void *data); #endif /* KRAD_H_ */