![]() |
The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Routines to encode / decode Ascend's filter attributes. More...
#include <freeradius-devel/util/base16.h>#include <freeradius-devel/util/misc.h>#include <freeradius-devel/util/pair.h>#include "radius.h"
Include dependency graph for abinary.c:Go to the source code of this file.
Data Structures | |
| struct | ascend_filter_t |
| union | ascend_filter_t.__unnamed204__ |
| struct | ascend_generic_filter_t |
| struct | ascend_ip_filter_t |
| struct | ascend_ipv6_filter_t |
| struct | ascend_ipx_filter_t |
| struct | ascend_ipx_net_t |
Macros | |
| #define | DONE_FLAGS |
| #define | IP_DEST_ADDR_FLAG (1 << 1) |
| #define | IP_DEST_PORT_FLAG (1 << 3) |
| #define | IP_EST_FLAG (1 << 5) |
| #define | IP_PROTO_FLAG (1 << 4) |
| #define | IP_SRC_ADDR_FLAG (1 << 0) |
| #define | IP_SRC_PORT_FLAG (1 << 2) |
| #define | IPX_NODE_ADDR_LEN 6 |
| #define | RAD_MAX_FILTER_LEN 6 |
Enumerations | |
| enum | ascend_filter_type_t { ASCEND_FILTER_GENERIC = 0 , ASCEND_FILTER_IP = 1 , ASCEND_FILTER_IPX = 2 , ASCEND_FILTER_IPV6 = 3 } |
| enum | FilterTokens { FILTER_IN , FILTER_OUT , FILTER_FORWARD , FILTER_DROP , FILTER_GENERIC_COMPNEQ , FILTER_GENERIC_COMPEQ , FILTER_MORE , FILTER_IP_DST , FILTER_IP_SRC , FILTER_IP_PROTO , FILTER_IP_DST_PORT , FILTER_IP_SRC_PORT , FILTER_EST , FILTER_IPX_DST_IPXNET , FILTER_IPX_DST_IPXNODE , FILTER_IPX_DST_IPXSOCK , FILTER_IPX_SRC_IPXNET , FILTER_IPX_SRC_IPXNODE , FILTER_IPX_SRC_IPXSOCK } |
| enum | RadFilterComparison { RAD_NO_COMPARE = 0 , RAD_COMPARE_LESS , RAD_COMPARE_EQUAL , RAD_COMPARE_GREATER , RAD_COMPARE_NOT_EQUAL } |
Functions | |
| static int | ascend_parse_generic (int argc, char **argv, ascend_generic_filter_t *filter) |
| static int | ascend_parse_ip (int argc, char **argv, ascend_ip_filter_t *filter) |
| static int | ascend_parse_ipaddr (uint32_t *ipaddr, char *str) |
| static int | ascend_parse_ipv6 (int argc, char **argv, ascend_ipv6_filter_t *filter) |
| static int | ascend_parse_ipx (int argc, char **argv, ascend_ipx_filter_t *filter) |
| static int | ascend_parse_ipx_net (int argc, char **argv, ascend_ipx_net_t *net, uint8_t *comp) |
| static int | ascend_parse_port (uint16_t *port, char *compare, char *str) |
| ssize_t | fr_radius_decode_abinary (fr_pair_t *vp, uint8_t const *data, size_t data_len) |
| Print an Ascend binary filter attribute to a string,. | |
| ssize_t | fr_radius_encode_abinary (fr_pair_t const *vp, fr_dbuff_t *dbuff) |
| Encode a string to abinary. | |
Variables | |
| static fr_table_num_sorted_t const | filterCompare [] |
| static size_t | filterCompare_len = NUM_ELEMENTS(filterCompare) |
| static fr_table_num_sorted_t const | filterKeywords [] |
| static size_t | filterKeywords_len = NUM_ELEMENTS(filterKeywords) |
| static fr_table_num_sorted_t const | filterPortType [] |
| static size_t | filterPortType_len = NUM_ELEMENTS(filterPortType) |
| static fr_table_num_sorted_t const | filterProtoName [] |
| static size_t | filterProtoName_len = NUM_ELEMENTS(filterProtoName) |
| static fr_table_num_sorted_t const | filterType [] |
| static size_t | filterType_len = NUM_ELEMENTS(filterType) |
Routines to encode / decode Ascend's filter attributes.
Definition in file abinary.c.
| struct ascend_filter_t |
| union ascend_filter_t.__unnamed204__ |
| Data Fields | ||
|---|---|---|
| ascend_generic_filter_t | generic | |
| ascend_ip_filter_t | ip | |
| ascend_ipv6_filter_t | ipv6 | |
| ascend_ipx_filter_t | ipx | |
| struct ascend_generic_filter_t |
| Data Fields | ||
|---|---|---|
| uint8_t | compNeq | |
| uint16_t | len | |
| uint8_t | mask[RAD_MAX_FILTER_LEN] | |
| uint16_t | more | |
| uint16_t | offset | |
| uint8_t | value[RAD_MAX_FILTER_LEN] | |
| struct ascend_ip_filter_t |
| struct ascend_ipv6_filter_t |
| struct ascend_ipx_filter_t |
Collaboration diagram for ascend_ipx_filter_t:| Data Fields | ||
|---|---|---|
| ascend_ipx_net_t | dst | |
| uint8_t | dstSocComp | |
| ascend_ipx_net_t | src | |
| uint8_t | srcSocComp | |
| struct ascend_ipx_net_t |
| #define DONE_FLAGS |
| enum ascend_filter_type_t |
| enum FilterTokens |
| enum RadFilterComparison |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Print an Ascend binary filter attribute to a string,.
Grrr... Ascend makes the server do this work, instead of doing it on the NAS.
| [in,out] | vp | Where the decoded string will be stored. |
| [in] | data | binary data to decodee |
| [in] | data_len | length of the binary data to decodee |
Definition at line 1316 of file abinary.c.
Here is the call graph for this function:| ssize_t fr_radius_encode_abinary | ( | fr_pair_t const * | vp, |
| fr_dbuff_t * | dbuff | ||
| ) |
Encode a string to abinary.
This routine will call routines to parse entries from an ASCII format to a binary format recognized by the Ascend boxes.
| vp | VP to encode |
| dbuff | where to write the VP data |
Definition at line 1192 of file abinary.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
1.9.8