| enum nmf_action_id |
| enum nmf_cond_type |
| enum nmf_qos_cn_mode |
| enum nmf_qos_port_attr_id |
| enum nmf_qos_slot_attr_id |
| enum nmf_qos_tc_pri_mode |
| nmf_status_t nmf_acl_add | ( | nmf_client_t | client_id, | |
| int | slot_id, | |||
| nmf_id_t * | acl_id, | |||
| char * | name, | |||
| nm_u32_t | scope, | |||
| int | precedence | |||
| ) |
Allocate an Access Control List.
Allocates an empty access control list. An ACL is identified by a unique name and nmf_id_t. The nmf_id_t is used in subsequent requests to modify or query the ACL.
An ACL must be enabled in order to be active. A newly created rule as returned by this function is inactive. See the nmf_acl_enable() and nmf_acl_disable() functions.
If the specified ACL name already exists, the function returns -NMF_EINUSE and returns the associated nmf_id_t. This function can therefore be used to lookup an ACL by name.
| clid | The client handle. | |
| slot | The slot number | |
| acl_id | Pointer to an nmf_id_t to receive the ACL Id. | |
| name | A name to associate with the ACL. | |
| prec | A rule precedence to prioritize this rule relative to other rules on the same switch. |
-NMF_EEXIST An ACL with the specified name already exists. The associated nmf_id_t is returned in the acl_id parameter.
| nmf_status_t nmf_acl_attr_get | ( | nmf_client_t | clid, | |
| int | slot, | |||
| int | acl_id, | |||
| enum nmf_acl_attr_id | id, | |||
| union nmf_acl_attr_value * | attr | |||
| ) |
Get an ACL attribute.
| clid | The client handle. | |
| slot | The slot number | |
| acl_id | The ACL number. | |
| attr_id | The attribute identifier | |
| attr | Pointer to the attribute value |
-NMF_ENOENT Slot or ACL id not found.
| nmf_status_t nmf_acl_attr_set | ( | nmf_client_t | clid, | |
| int | slot, | |||
| nmf_id_t | acl_id, | |||
| enum nmf_acl_attr_id | id, | |||
| union nmf_acl_attr_value * | attr | |||
| ) |
Set an ACL attribute.
| clid | The client handle. | |
| slot | The slot number | |
| acl_lag | The ACL number. | |
| attr_id | The attribute identifier | |
| attr | Pointer to the attribute value |
-NMF_ENOENT Slot or ACL id was not found.
| nmf_status_t nmf_acl_commit | ( | nmf_client_t | client_id, | |
| int | slot_id | |||
| ) |
Commit ACL changes.
Commit all ACL changes since the last commit to the slot.
| clid | The client handle. | |
| slot | The slot number |
| nmf_status_t nmf_acl_list_get | ( | nmf_client_t | client_id, | |
| int | slot_id, | |||
| nm_bv_t * | bv | |||
| ) |
Query the set of Access Control Lists.
Queries the set of ACL defined on the slot and returns the set as a bit vector of nmf_id_t.
| clid | The client handle. | |
| slot | The slot number | |
| bv | Pointer to an nm_bv_t to contain the set of acl_id defined for the switch. |
| nmf_status_t nmf_acl_rem | ( | nmf_client_t | client_id, | |
| int | slot_id, | |||
| nmf_id_t | acl_id | |||
| ) |
Remove a perviously defined ACL.
Remove an ACL and all associated rules from the switch
| clid | The client handle. | |
| slot | The slot number | |
| acl_id | The ACL Id. |
| nmf_status_t nmf_acl_rule_add | ( | nmf_client_t | client_id, | |
| int | slot_id, | |||
| nmf_id_t | acl_id, | |||
| int | rule_no, | |||
| struct nmf_acl_rule * | acl_rule | |||
| ) |
Add a rule to an Access Control List.
Queries the set of ACL defined on the slot and returns the set as a bit vector of nmf_id_t.
| clid | The client handle. | |
| slot | The slot number | |
| acl_id | The ACL Id. | |
| rule_no | The rule number is monotonically increasing, zero-based index that uniquely identifies a rule and it's priority with respect to other rules. Rule 0 has the highest priority. | |
| acl_rule | Pointer to an acl_rule structure defining the ACL. |
-NMF_ERANGE The switch cannot handle any more rules.
| struct nmf_acl_rule* nmf_acl_rule_alloc | ( | int | cond_count, | |
| int | action_count | |||
| ) | [read] |
Allocate the memory for an ACL rule.
| acl_rule | Pointer to an acl_rule to free |
| struct nmf_acl_rule* nmf_acl_rule_dup | ( | struct nmf_acl_rule * | dst | ) | [read] |
Copy an ACL.
| dst | Pointer to destination | |
| src | Pointer to source |
| void nmf_acl_rule_free | ( | struct nmf_acl_rule * | acl_rule | ) |
Free the memory for an ACL rule.
| acl_rule | Pointer to an acl_rule to free |
| nmf_status_t nmf_acl_rule_get | ( | nmf_client_t | client_id, | |
| int | slot_id, | |||
| nmf_id_t | acl_id, | |||
| int | rule, | |||
| struct nmf_acl_rule ** | acl_rule | |||
| ) |
Query a rule from an Access Control List.
Queries the an ACL for the specified rule number. Memory is allocated for the ACL. The caller must free this memory by calling nmf_acl_rule_put.
| clid | The client handle. | |
| slot | The slot number | |
| acl_id | The ACL Id. | |
| rule_no | The rule number. | |
| acl_rule | Pointer to an acl_rule structure defining the ACL. |
acl_rule. -NMF_NOENT The rule was not found.
| nmf_status_t nmf_acl_rule_rem | ( | nmf_client_t | client_id, | |
| int | slot_id, | |||
| nmf_id_t | acl_id, | |||
| int | rule | |||
| ) |
Add a rule to an Access Control List.
Queries the set of ACL defined on the slot and returns the set as a bit vector of nmf_id_t.
| clid | The client handle. | |
| slot | The slot number | |
| acl_id | The ACL Id. | |
| rule_no | The rule number is user-defined a zero-based index that uniquely identifies a rule and it's priority with respect to other rules. Rule 0 has the highest priority. |
1.5.6