Jump to main content

##

# IPV6_ADDRESS_POLICY Structure

## C

    typedef struct {
    IPV6_ADDR address;
    unsigned char prefixLength;
    unsigned char precedence;
    unsigned char label;
    } IPV6_ADDRESS_POLICY;

## Desscription

Type: IPV6_ADDRESS_POLICY.

The policy table is the longest matching prefix lookup table and is used to select the destination IPv6 Address.

If Precedence(A) > Precedence(B), address A has higher precedence than address B. The label value Label(A) allows for policies that prefer a particular source address prefix for use with a destination address prefix. Default Policy table - Prefix Precedence Label ::1/128 50 0 ::/0 40 1 2002::/16 30 2 ::/96 20 3 ::ffff:0.0.0.0/96 10 4

## Members

Parameters | Description
--- | ---
address | IPv6 address.
prefixLength | IPv6 prefix length.
precedence | IPv6 address precedence.
label | IPv6 label type.

## Remarks

None.

## Example

    const IPV6_ADDRESS_POLICY gPolicyTable[] = { {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}}, 128, 50, 0}, // Loopback address {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}, 0, 40, 1}, // Unspecified address {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00}}, 96, 35, 4}, // IPv4-mapped address {{{0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}, 16, 30, 2}, // 2002::/15 - 6to4 {{{0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}, 32, 5, 5}, // 2001::/32 - Teredo tunneling {{{0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}, 7, 3, 13}, // ULA };