"Fossies" - the Fresh Open Source Software Archive

Member "freeradius-server-3.0.23/src/include/process.h" (10 Jun 2021, 2088 Bytes) of package /linux/misc/freeradius-server-3.0.23.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "process.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 3.0.22_vs_3.0.23.

    1 #ifndef FR_PROCESS_H
    2 #define FR_PROCESS_H
    3 
    4 /*
    5  * process.h    State machine for a server to process packets.
    6  *
    7  * Version: $Id: e7a8e392640f85f5106b2c572859924bdb86189a $
    8  *
    9  *   This program is free software; you can redistribute it and/or modify
   10  *   it under the terms of the GNU General Public License as published by
   11  *   the Free Software Foundation; either version 2 of the License, or
   12  *   (at your option) any later version.
   13  *
   14  *   This program is distributed in the hope that it will be useful,
   15  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
   16  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   17  *   GNU General Public License for more details.
   18  *
   19  *   You should have received a copy of the GNU General Public License
   20  *   along with this program; if not, write to the Free Software
   21  *   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
   22  *
   23  * Copyright 2012 The FreeRADIUS server project
   24  * Copyright 2012 Alan DeKok <aland@deployingradius.com>
   25  */
   26 
   27 RCSIDH(process_h, "$Id: e7a8e392640f85f5106b2c572859924bdb86189a $")
   28 
   29 #include <freeradius-devel/clients.h>
   30 #include <freeradius-devel/listen.h>
   31 
   32 #ifdef __cplusplus
   33 extern "C" {
   34 #endif
   35 
   36 #ifdef HAVE_SYSTEMD_WATCHDOG
   37 extern struct timeval sd_watchdog_interval;
   38 #endif
   39 
   40 typedef enum fr_state_action_t {    /* server action */
   41     FR_ACTION_INVALID = 0,
   42     FR_ACTION_RUN,
   43     FR_ACTION_DONE,
   44     FR_ACTION_DUP,
   45     FR_ACTION_TIMER,
   46 #ifdef WITH_PROXY
   47     FR_ACTION_PROXY_REPLY,
   48 #endif
   49     FR_ACTION_CANCELLED,
   50 } fr_state_action_t;
   51 
   52 /*
   53  *  Function handler for requests.
   54  */
   55 typedef int (*RAD_REQUEST_FUNP)(REQUEST *);
   56 typedef void (*fr_request_process_t)(REQUEST *, int);
   57 
   58 extern time_t fr_start_time;
   59 
   60 #ifdef HAVE_PTHREAD_H
   61 /*
   62  *  In threads.c
   63  */
   64 int request_enqueue(REQUEST *request);
   65 #endif
   66 
   67 int request_receive(TALLOC_CTX *ctx, rad_listen_t *listener, RADIUS_PACKET *packet,
   68             RADCLIENT *client, RAD_REQUEST_FUNP fun);
   69 void request_inject(REQUEST *request);
   70 
   71 #ifdef WITH_PROXY
   72 int request_proxy_reply(RADIUS_PACKET *packet);
   73 #endif
   74 
   75 #ifdef __cplusplus
   76 }
   77 #endif
   78 
   79 #endif /* FR_PROCESS_H */