tor  0.4.1.0-alpha-dev
Functions
policy_parse.h File Reference
#include "lib/testsupport/testsupport.h"

Go to the source code of this file.

Functions

 MOCK_DECL (addr_policy_t *, router_parse_addr_policy_item_from_string,(const char *s, int assume_action, int *malformed_list))
 
addr_policy_trouter_parse_addr_policy (struct directory_token_t *tok, unsigned fmt_flags)
 

Detailed Description

Header file for policy_parse.c.

Definition in file policy_parse.h.

Function Documentation

◆ router_parse_addr_policy()

addr_policy_t* router_parse_addr_policy ( directory_token_t tok,
unsigned  fmt_flags 
)

Given a K_ACCEPT[6] or K_REJECT[6] token and a router, create and return a new exit_policy_t corresponding to the token. If TAPMP_EXTENDED_STAR is set in fmt_flags, K_ACCEPT6 and K_REJECT6 tokens followed by * expand to IPv6-only policies, otherwise they expand to IPv4 and IPv6 policies

Definition at line 136 of file policy_parse.c.

References tor_assert(), and directory_token_t::tp.

Referenced by router_add_exit_policy().