The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
Functions | Variables
inet_tests.c File Reference

Tests for IP address parsing and formatting. More...

#include "acutest.h"
#include "acutest_helpers.h"
#include <freeradius-devel/util/inet.h>
+ Include dependency graph for inet_tests.c:

Go to the source code of this file.

Functions

static void test_inet_ntop (void)
 
static void test_inet_ntop_prefix (void)
 
static void test_inet_pton4_basic (void)
 
static void test_inet_pton4_invalid (void)
 
static void test_inet_pton4_prefix (void)
 
static void test_inet_pton6_basic (void)
 
static void test_inet_pton6_prefix (void)
 
static void test_inet_pton_auto (void)
 
static void test_inet_pton_port (void)
 
static void test_ipaddr_cmp (void)
 
static void test_ipaddr_is_inaddr_any (void)
 
static void test_ipaddr_is_prefix (void)
 
static void test_ipaddr_mask (void)
 
static void test_ipaddr_sockaddr (void)
 

Variables

 TEST_LIST
 

Detailed Description

Tests for IP address parsing and formatting.

Definition in file inet_tests.c.

Function Documentation

◆ test_inet_ntop()

static void test_inet_ntop ( void  )
static

Definition at line 170 of file inet_tests.c.

+ Here is the call graph for this function:

◆ test_inet_ntop_prefix()

static void test_inet_ntop_prefix ( void  )
static

Definition at line 191 of file inet_tests.c.

+ Here is the call graph for this function:

◆ test_inet_pton4_basic()

static void test_inet_pton4_basic ( void  )
static

Definition at line 31 of file inet_tests.c.

+ Here is the call graph for this function:

◆ test_inet_pton4_invalid()

static void test_inet_pton4_invalid ( void  )
static

Definition at line 79 of file inet_tests.c.

+ Here is the call graph for this function:

◆ test_inet_pton4_prefix()

static void test_inet_pton4_prefix ( void  )
static

Definition at line 58 of file inet_tests.c.

+ Here is the call graph for this function:

◆ test_inet_pton6_basic()

static void test_inet_pton6_basic ( void  )
static

Definition at line 96 of file inet_tests.c.

+ Here is the call graph for this function:

◆ test_inet_pton6_prefix()

static void test_inet_pton6_prefix ( void  )
static

Definition at line 125 of file inet_tests.c.

+ Here is the call graph for this function:

◆ test_inet_pton_auto()

static void test_inet_pton_auto ( void  )
static

Definition at line 146 of file inet_tests.c.

+ Here is the call graph for this function:

◆ test_inet_pton_port()

static void test_inet_pton_port ( void  )
static

Definition at line 305 of file inet_tests.c.

+ Here is the call graph for this function:

◆ test_ipaddr_cmp()

static void test_ipaddr_cmp ( void  )
static

Definition at line 206 of file inet_tests.c.

+ Here is the call graph for this function:

◆ test_ipaddr_is_inaddr_any()

static void test_ipaddr_is_inaddr_any ( void  )
static

Definition at line 257 of file inet_tests.c.

+ Here is the call graph for this function:

◆ test_ipaddr_is_prefix()

static void test_ipaddr_is_prefix ( void  )
static

Definition at line 281 of file inet_tests.c.

+ Here is the call graph for this function:

◆ test_ipaddr_mask()

static void test_ipaddr_mask ( void  )
static

Definition at line 234 of file inet_tests.c.

+ Here is the call graph for this function:

◆ test_ipaddr_sockaddr()

static void test_ipaddr_sockaddr ( void  )
static

Definition at line 330 of file inet_tests.c.

+ Here is the call graph for this function:

Variable Documentation

◆ TEST_LIST

TEST_LIST
Initial value:
= {
{ "inet_pton4_basic", test_inet_pton4_basic },
{ "inet_pton4_prefix", test_inet_pton4_prefix },
{ "inet_pton4_invalid", test_inet_pton4_invalid },
{ "inet_pton6_basic", test_inet_pton6_basic },
{ "inet_pton6_prefix", test_inet_pton6_prefix },
{ "inet_pton_auto", test_inet_pton_auto },
{ "inet_ntop", test_inet_ntop },
{ "inet_ntop_prefix", test_inet_ntop_prefix },
{ "ipaddr_cmp", test_ipaddr_cmp },
{ "ipaddr_mask", test_ipaddr_mask },
{ "ipaddr_is_inaddr_any", test_ipaddr_is_inaddr_any },
{ "ipaddr_is_prefix", test_ipaddr_is_prefix },
{ "inet_pton_port", test_inet_pton_port },
{ "ipaddr_sockaddr", test_ipaddr_sockaddr },
}
#define TEST_TERMINATOR
Definition acutest.h:64
static void test_ipaddr_mask(void)
Definition inet_tests.c:234
static void test_inet_ntop(void)
Definition inet_tests.c:170
static void test_inet_pton4_prefix(void)
Definition inet_tests.c:58
static void test_ipaddr_cmp(void)
Definition inet_tests.c:206
static void test_inet_pton4_basic(void)
Definition inet_tests.c:31
static void test_inet_pton_auto(void)
Definition inet_tests.c:146
static void test_inet_pton_port(void)
Definition inet_tests.c:305
static void test_inet_pton6_prefix(void)
Definition inet_tests.c:125
static void test_inet_pton6_basic(void)
Definition inet_tests.c:96
static void test_inet_ntop_prefix(void)
Definition inet_tests.c:191
static void test_ipaddr_is_prefix(void)
Definition inet_tests.c:281
static void test_ipaddr_is_inaddr_any(void)
Definition inet_tests.c:257
static void test_inet_pton4_invalid(void)
Definition inet_tests.c:79
static void test_ipaddr_sockaddr(void)
Definition inet_tests.c:330

Definition at line 354 of file inet_tests.c.