2.2.1.2.259 BGP_POLICY_MODIFY

The BGP_POLICY_MODIFY structure<188> specifies an attribute of the BGP route that MUST be modified if the policy is matched.

 typedef struct _BGP_POLICY_MODIFY  {
   BGP_POLICY_MODIFY_ATTR_TYPE eAttrType;
   union {
     DWORD dwCommunity;
     DWORD dwLocalPref;
     BGP_IP_ADDRESS nextHop;
     DWORD dwMed;
   } ModifyAttr;
 } BGP_POLICY_MODIFY,
  *PBGP_POLICY_MODIFY;

eAttrType: Specifies the attribute type that is used to modify a BGP route. This value MUST be one of the following values.

Value

Meaning

AddCommunity

(0x1)

A community attribute with the value specified in the dwCommunity field is added to the BGP route.

RemoveCommunity

(0x2)

A community attribute with the value specified in the dwCommunity field is removed from the BGP route (if present).

NewLocalPref

(0x3)

A Local preference attribute with the value specified in the dwLocalPref field is added or modified to the BGP route.

NewNextHop

(0x4)

The next hop specified in the nextHop field is updated to the BGP route.

NewMed

(0x5)

The MED attribute in the BGP route is updated with the MED attribute specified in the dwMed field.

dwCommunity: Specifies the value of the community attribute used to modify a BGP route.

dwLocalPref: Specifies the value of the local preference that is used to modify the path attribute of a BGP route.

nextHop: Specifies the value of the next hop that is used to modify the path attribute of a BGP route

dwMed: Specifies the value of the MED that is used to modify the MED attribute of a BGP route.