The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Macros | Functions | Variables
client.c File Reference

Talk to the event loop. More...

#include <freeradius-devel/server/base.h>
#include <freeradius-devel/util/debug.h>
#include <freeradius-devel/protocol/eap/aka-sim/dictionary.h>
#include <freeradius-devel/server/module_rlm.h>
#include "attrs.h"
#include "sigtran.h"
+ Include dependency graph for client.c:

Go to the source code of this file.

Macros

#define LOG_PREFIX   "sigtran"
 

Functions

static void _sigtran_pipe_error (UNUSED fr_event_list_t *el, int fd, UNUSED int flags, int fd_errno, UNUSED void *uctx)
 This should never happen. More...
 
static void _sigtran_pipe_read (UNUSED fr_event_list_t *el, int fd, UNUSED int flags, UNUSED void *uctx)
 Drain any data we received. More...
 
static int sigtran_client_do_ctrl_transaction (sigtran_transaction_t *txn)
 
int sigtran_client_do_transaction (int fd, sigtran_transaction_t *txn)
 
int sigtran_client_link_down (sigtran_conn_t const **conn)
 Destroy a connection. More...
 
int sigtran_client_link_up (sigtran_conn_t const **out, sigtran_conn_conf_t const *conn_conf)
 Create a new connection. More...
 
static unlang_action_t sigtran_client_map_resume (rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
 
unlang_action_t sigtran_client_map_send_auth_info (rlm_rcode_t *p_result, rlm_sigtran_t const *inst, request_t *request, sigtran_conn_t const *conn, int fd)
 Create a MAP_SEND_AUTH_INFO request. More...
 
static void sigtran_client_signal (module_ctx_t const *mctx, UNUSED request_t *request, UNUSED fr_signal_t action)
 
int sigtran_client_thread_register (fr_event_list_t *el)
 Called by a new thread to register a new req_pipe. More...
 
int sigtran_client_thread_unregister (fr_event_list_t *el, int req_pipe_fd)
 Signal that libosmo should unregister the other side of the pipe. More...
 

Variables

static pthread_mutex_t ctrl_pipe_mutex = PTHREAD_MUTEX_INITIALIZER
 

Detailed Description

Talk to the event loop.

Id
a3b2e80bb4b1a6d92238adc714d04fa8b89bc3e0

Definition in file client.c.

Macro Definition Documentation

◆ LOG_PREFIX

#define LOG_PREFIX   "sigtran"

Definition at line 27 of file client.c.

Function Documentation

◆ _sigtran_pipe_error()

static void _sigtran_pipe_error ( UNUSED fr_event_list_t el,
int  fd,
UNUSED int  flags,
int  fd_errno,
UNUSED void *  uctx 
)
static

This should never happen.

Definition at line 99 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _sigtran_pipe_read()

static void _sigtran_pipe_read ( UNUSED fr_event_list_t el,
int  fd,
UNUSED int  flags,
UNUSED void *  uctx 
)
static

Drain any data we received.

We don't care about this data, we just don't want the kernel to signal the other side that our read buffer's full.

Definition at line 110 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sigtran_client_do_ctrl_transaction()

static int sigtran_client_do_ctrl_transaction ( sigtran_transaction_t txn)
static

Definition at line 83 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sigtran_client_do_transaction()

int sigtran_client_do_transaction ( int  fd,
sigtran_transaction_t txn 
)

Definition at line 45 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sigtran_client_link_down()

int sigtran_client_link_down ( sigtran_conn_t const **  conn)

Destroy a connection.

Gracefully shutdown the links for a connection and free it.

Definition at line 250 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sigtran_client_link_up()

int sigtran_client_link_up ( sigtran_conn_t const **  out,
sigtran_conn_conf_t const *  conn_conf 
)

Create a new connection.

Register the required links for a connection.

Todo:
Return struct representing the connection

Definition at line 225 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sigtran_client_map_resume()

static unlang_action_t sigtran_client_map_resume ( rlm_rcode_t p_result,
module_ctx_t const *  mctx,
request_t request 
)
static

Definition at line 280 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sigtran_client_map_send_auth_info()

unlang_action_t sigtran_client_map_send_auth_info ( rlm_rcode_t p_result,
rlm_sigtran_t const *  inst,
request_t request,
sigtran_conn_t const *  conn,
int  fd 
)

Create a MAP_SEND_AUTH_INFO request.

Parameters
p_resultWhere to write the result.
instof rlm_sigtran.
requestThe current request.
conncurrent connection.
fdfile descriptor on which the transaction is done

Definition at line 406 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sigtran_client_signal()

static void sigtran_client_signal ( module_ctx_t const *  mctx,
UNUSED request_t request,
UNUSED fr_signal_t  action 
)
static

Definition at line 272 of file client.c.

+ Here is the caller graph for this function:

◆ sigtran_client_thread_register()

int sigtran_client_thread_register ( fr_event_list_t el)

Called by a new thread to register a new req_pipe.

Returns
  • The client side of the req_pipe on success.
  • -1 on error.

Definition at line 144 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sigtran_client_thread_unregister()

int sigtran_client_thread_unregister ( fr_event_list_t el,
int  req_pipe_fd 
)

Signal that libosmo should unregister the other side of the pipe.

Parameters
[in]elthe request pipe was registered to.
[in]req_pipe_fdThe rlm_sigtran side of the req_pipe.

Definition at line 193 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ ctrl_pipe_mutex

pthread_mutex_t ctrl_pipe_mutex = PTHREAD_MUTEX_INITIALIZER
static

Definition at line 38 of file client.c.