The FreeRADIUS server $Id: a4e7f8c94e8038b7627bcf52356b7ed15955c1d7 $
Loading...
Searching...
No Matches
Functions
network.c File Reference

BIO patricia trie filtering handlers. More...

#include <freeradius-devel/util/value.h>
#include <freeradius-devel/util/trie.h>
#include <freeradius-devel/bio/network.h>
+ Include dependency graph for network.c:

Go to the source code of this file.

Functions

fr_trie_t * fr_bio_network_trie_alloc (TALLOC_CTX *ctx, int af, fr_ipaddr_t const *allow, fr_ipaddr_t const *deny)
 Create a patricia trie for doing network filtering.
 
bool fr_bio_network_trie_allow (fr_trie_t const *trie, struct sockaddr const *sockaddr, socklen_t socklen)
 Check if the source of a packet or connection is allowed by the network trie.
 

Detailed Description

BIO patricia trie filtering handlers.

Id
73b653f81a790c7a6b5cde7bd2da9dbcab6a9111

Definition in file network.c.

Function Documentation

◆ fr_bio_network_trie_alloc()

fr_trie_t * fr_bio_network_trie_alloc ( TALLOC_CTX *  ctx,
int  af,
fr_ipaddr_t const *  allow,
fr_ipaddr_t const *  deny 
)

Create a patricia trie for doing network filtering.

Definition at line 51 of file network.c.

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

◆ fr_bio_network_trie_allow()

bool fr_bio_network_trie_allow ( fr_trie_t const *  trie,
struct sockaddr const *  sockaddr,
socklen_t  socklen 
)

Check if the source of a packet or connection is allowed by the network trie.

Parameters
triecreated by fr_bio_network_trie_alloc().
sockaddrthe source address of the packet or connection.
socklenthe length of the source address.
Returns
  • true if the source address is allowed.
  • false if the source address is denied, is not in the trie, or is not an IP address.

Definition at line 39 of file network.c.

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