2.2.1.2.258 BGP_POLICY_MATCH
The BGP_POLICY_MATCH structure<187> is used to represent a single Match clause in a BGP policy. The Match clause is used to filter the BGP routes on which the BGP policy would be allowed.
-
typedef struct _BGP_POLICY_MATCH { BGP_POLICY_MATCH_TYPE eType; union { BGP_IP_PREFIX prefix; BGP_ASN_RANGE asnRange; DWORD dwCommunity; DWORD dwMaxPrefixes; } PolicyMatch; } BGP_POLICY_MATCH, *PBGP_POLICY_MATCH;
eType: Specifies the attribute type to be used while matching the policy for a BGP route. This value MUST be one of the following values.
-
Value
Meaning
MatchPrefix
(0x1)
The policy match is done based on the network prefix of the BGP route. The value of the prefix field is used for the comparison.
MatchIgnorePrefix
(0x2)
The policy match is done based on the network prefix of the BGP route. It filters out the BGP routes whose prefix value is the same as that specified in the prefix field.
MatchAsnRange
(0x3)
The policy match is done based on the ASN attribute of the BGP route. The value of the asnRange field is used for the comparison.
MatchCommunity
(0x4)
The policy match is done based on the community attribute of the route. The value of the dwCommunity field is used for the comparison.
MatchMaxPrefixes
(0x5)
The policy match is done based on the number of prefixes learned from a BGP peer. The value of the dwMaxPrefixes field is used for the comparison.
prefix: Specifies the network prefix that would be compared with the network prefix of the BGP route. This MUST be of type BGP_IP_PREFIX (section 2.2.1.2.255).
asnRange: Specifies the ASN range that would be compared with the ASN in the ASN path attribute of the BGP route. This MUST be of type BGP_ASN_RANGE (section 2.2.1.2.256).
dwCommunity: Specifies the value of the community attribute that would be compared with the community attribute of the BGP route.
dwMaxPrefixes: Specifies the maximum number of prefixes that can be learned from a BGP peer.