2.2.1.2.261 BGP_POLICY

The BGP_POLICY structure<190> is used to get or set the policy configuration of a BGP speaker. A policy can be composed of zero or more Match clauses and one or more Action clauses. All the Match clauses are always grouped in logical AND. Similarly, all the Action clauses are always grouped in logical AND. Action clauses are applied only if all the Match clauses are satisfied.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

dwFlags

szPolicyName (152 bytes)

...

...

eType

uMatchCount

uActionCount

Matches (variable)

...

Actions (variable)

...

dwFlags (4 bytes): Specifies the policy attribute that is being modified. This field is used while modifying the BGP policy configuration. The value MUST be a bit-wise OR combination of one or more of the following values.

Value

Meaning

0x00000001

The Match clauses are modified.

0x00000002

The Action clauses are modified.

szPolicyName (152 bytes): A null-terminated Unicode string that contains the name of the BGP policy.

eType (4 bytes): Specifies the policy type as defined in BGP_POLICY_TYPE (section 2.2.1.1.23) enumeration type. 

uMatchCount (4 bytes): Specifies the number of Match clauses.

uActionCount (4 bytes): Specifies the number of Action clauses.

Matches (variable): A list of consecutive entries of Match clauses, uMatchCount in number, each of which MUST be of type BGP_POLICY_MATCH (section 2.2.1.2.258). 

Actions (variable): A list of consecutive entries of Action clauses, uActionCount in number, each of which MUST be of type BGP_POLICY_ACTION (section 2.2.1.2.260). The Action clause MUST ignore the Modify field of BGP_POLICY_ACTION when the eType field is set to PolicyFilter (0x1). 

A BGP policy:

  • MUST NOT have more than one Match clause with eType in BGP_POLICY_MATCH set to MatchASNRange (0x3).

  • MUST NOT have more than one Match clause with eType in BGP_POLICY_MATCH set to MatchMaxPrefixes (0x5).

  • MUST NOT have more than one modify Action clause with eAttrType in BGP_POLICY_MODIFY (section 2.2.1.2.259) set to NewLocalPref (0x3). 

  • MUST NOT have more than one modify Action clause with eAttrType in BGP_POLICY_MODIFY set to NewNextHop (0x4).

  • MUST NOT have more than one modify Action clause with eAttrType in BGP_POLICY_MODIFY set to NewMed (0x5).

  • MUST have only one Action clause with bDeny in BGP_POLICY_ACTION set to TRUE when a Match clause with eType in BGP_POLICY_MATCH is specified as MatchMaxPrefixes (0x5).