tor  master
Data Fields
addr_policy_t Struct Reference

#include <or.h>

Collaboration diagram for addr_policy_t:
Collaboration graph
[legend]

Data Fields

int refcnt
 
addr_policy_action_bitfield_t policy_type:2
 
unsigned int is_private:1
 
unsigned int is_canonical:1
 
maskbits_t maskbits
 
tor_addr_t addr
 
uint16_t prt_min
 
uint16_t prt_max
 

Detailed Description

A reference-counted address policy rule.

Field Documentation

◆ addr

tor_addr_t addr

Base address to accept or reject.

Note that wildcards are treated differntly depending on address family. An AF_UNSPEC address means "All addresses, IPv4 or IPv6." An AF_INET address with maskbits==0 means "All IPv4 addresses" and an AF_INET6 address with maskbits == 0 means "All IPv6 addresses".

◆ is_canonical

unsigned int is_canonical

True iff this policy is the canonical copy (stored in a hash table to avoid duplication of common policies)

◆ is_private

unsigned int is_private

True iff this is the pseudo-address, "private".

◆ maskbits

maskbits_t maskbits

Accept/reject all addresses a such that the first maskbits bits of a match addr.

◆ policy_type

addr_policy_action_bitfield_t policy_type

What to do when the policy matches.

◆ prt_max

uint16_t prt_max

Highest port number to accept/reject.

◆ prt_min

uint16_t prt_min

Lowest port number to accept/reject.

◆ refcnt

int refcnt

Reference count


The documentation for this struct was generated from the following file: