unbound: port_if Struct Reference

unbound 0.1

Data Fields
port_if Struct Reference

Outgoing interface. More...

`#include <outside_network.h>`

## Data Fields
struct sockaddr_storage | addr
| address ready to allocate new socket (except port no).
socklen_t | addrlen
| length of addr field
int | pfxlen
| prefix length of network address (in bits), for randomisation.
int * | avail_ports
| the available ports array.
int | avail_total
| the total number of available ports (size of the array)
struct port_comm ** | out
| array of the commpoints currently in use.
int | maxout
| max number of fds, size of out array
int | inuse
| number of commpoints (and thus also ports) in use

## Detailed Description

Outgoing interface.

Ports available and currently used are tracked per interface

## Field Documentation

## ◆ pfxlen

int port_if::pfxlen

prefix length of network address (in bits), for randomisation.

if 0, no randomisation.

Referenced by select_ifport(), and setup_if().

## ◆ avail_ports

int* port_if::avail_ports

the available ports array.

These are unused. Only the first total-inuse part is filled.

Referenced by fd_for_dest(), outside_network_delete(), portcomm_loweruse(), select_ifport(), and setup_if().

## ◆ out

struct port_comm** port_if::out

array of the commpoints currently in use.

allocated for max number of fds, first part in use.

Referenced by fd_for_dest(), if_get_mem(), outside_network_delete(), portcomm_loweruse(), select_ifport(), and setup_if().

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

- services/outside_network.h