Packet Monitor Functions


Data Structures

struct  nmf_policer_stats
 The count of packets and bytes for this policer. More...
union  nmf_policer_attr_value
 Policer Attribute Values. More...

Enumerations

enum  nmf_policer_action { NMF_POLICER_ACTION_DROP = 1, NMF_POLICER_ACTION_MKDN }
 Policer Actions. More...
enum  nmf_policer_color { , NMF_POLICER_COLOR_DSCP, NMF_POLICER_COLOR_SWPRI }
 Policer Markdown Colors. More...
enum  nmf_policer_attr_id {
  NMF_POLICER_ATTR_NAME = 1, NMF_POLICER_ATTR_DESC, NMF_POLICER_ATTR_STATS, NMF_POLICER_ATTR_COMMITTED_ACTION,
  NMF_POLICER_ATTR_COMMITTED_CAPACITY, NMF_POLICER_ATTR_COMMITTED_RATE, NMF_POLICER_ATTR_EXCESS_ACTION, NMF_POLICER_ATTR_EXCESS_CAPACITY,
  NMF_POLICER_ATTR_EXCESS_RATE, NMF_POLICER_ATTR_COLOR_SOURCE, NMF_POLICER_ATTR_MKDN_DSCP, NMF_POLICER_ATTR_MKDN_SWPRI,
  NMF_POLICER_ATTR_MKDN_DSCP_MAP, NMF_POLICER_ATTR_MKDN_SWPRI_MAP
}
 Policer Attribute Identifiers. More...

Functions

nmf_status_t nmf_policer_add (nmf_client_t client_id, int slot_id, nmf_id_t *policer_id, char *name)
 Add a policer to the switch.
nmf_status_t nmf_policer_rem (nmf_client_t client_id, int slot_id, nmf_id_t policer_id)
 Remove a policer from the switch.
nmf_status_t nmf_policer_list_get (nmf_client_t client_id, int slot_id, nm_bv_t *policer_list)
 Get the Counter list.
nmf_status_t nmf_policer_attr_set (nmf_client_t clid, int slot, nmf_id_t policer_id, enum nmf_policer_attr_id id, union nmf_policer_attr_value *attr)
 Set the Counter attribute.
nmf_status_t nmf_policer_attr_get (nmf_client_t clid, int slot, nmf_id_t policer_id, enum nmf_policer_attr_id id, union nmf_policer_attr_value *attr)
 Get a Counter attribute.

Enumeration Type Documentation

Policer Actions.

Packet policers are used to count and optionally color incoming packets. Counters are "hit" when the associated ACL condition matches.

Enumerator:
NMF_POLICER_ACTION_DROP  Drop the the frame when the counter is exceeded.
NMF_POLICER_ACTION_MKDN  Mark down the frame's down when the counter is exceeded.

Definition at line 1982 of file nmf.h.

Policer Attribute Identifiers.

Enumerator:
NMF_POLICER_ATTR_NAME  The policer name
NMF_POLICER_ATTR_DESC  Text description for the policer.
NMF_POLICER_ATTR_STATS  Packet and byte counts for hits on this policer
NMF_POLICER_ATTR_COMMITTED_ACTION  The action to take when the counter's committed capacity is exceeded.
NMF_POLICER_ATTR_COMMITTED_CAPACITY  The counter's commited token bucket capacity in bytes. The default value is zero.
NMF_POLICER_ATTR_COMMITTED_RATE  The rate at which the counter's commited rate token bucket is refilled in kilobits per second.
NMF_POLICER_ATTR_EXCESS_ACTION  The action to take when the counter's excess capacity is exceeded.
NMF_POLICER_ATTR_EXCESS_CAPACITY  The counter's excess rate token bucket capacity in bytes. The default value of 0.
NMF_POLICER_ATTR_EXCESS_RATE  The rate at which the counter's excess rate token bucket is refilled in kilobits per second.
NMF_POLICER_ATTR_COLOR_SOURCE  The color source for an ingressing frame being managed by a counter. A counter can identify the color of an ingressing frame
NMF_POLICER_ATTR_MKDN_DSCP  Set to true if frames exceeding the committed or exceess thresholds are to have their DSCP code points modified based on the DSCP MAP.
NMF_POLICER_ATTR_MKDN_SWPRI  Set to true if frames exceeding the committed or exceess thresholds are to have their SWPRI modified based on the DSCP MAP.
NMF_POLICER_ATTR_MKDN_DSCP_MAP  The DSCP down marking map. The map is an array of 64 integers indexed by the current value of the frame's DSCP field with the entry being the new DSCP value to mark down to. Each entry must be between 0 and 63. Note that this attribute is global to all counters.
NMF_POLICER_ATTR_MKDN_SWPRI_MAP  The SWPRI down marking map. The map is an array of 16 integers indexed by the current value of the frame's SWPRI field with the entry being the new SWPRI value to mark down to. Each entry must be between 0 and 15. Note that this attribute is global to all counters.

Definition at line 2006 of file nmf.h.

Policer Markdown Colors.

Enumerator:
NMF_POLICER_COLOR_DSCP  Initial color is green.
NMF_POLICER_COLOR_SWPRI  Initial color source is the DSCP field

Initial color source is the switch priority.

Definition at line 1997 of file nmf.h.


Function Documentation

nmf_status_t nmf_policer_add ( nmf_client_t  client_id,
int  slot_id,
nmf_id_t policer_id,
char *  name 
)

Add a policer to the switch.

Parameters:
client_id The client handle.
slot_id The slot number.
policer_id Pointer to nmf_id_t value where id for new policer will be stored.
name The name of a new counter to create.
Returns:
NMF_OK A policer was allocated and the new id is stored in policer_id.

NMF_EEXIST A Policer with the specified name already exists.

nmf_status_t nmf_policer_attr_get ( nmf_client_t  clid,
int  slot,
nmf_id_t  policer_id,
enum nmf_policer_attr_id  id,
union nmf_policer_attr_value attr 
)

Get a Counter attribute.

Parameters:
clid The client handle.
slot The slot number
name The name of the counter.
id The attribute identifier
attr Pointer to the attribute value
Returns:
NMF_OK Success

-NMF_ENOENT Slot or LAG id not found.

nmf_status_t nmf_policer_attr_set ( nmf_client_t  clid,
int  slot,
nmf_id_t  policer_id,
enum nmf_policer_attr_id  id,
union nmf_policer_attr_value attr 
)

Set the Counter attribute.

Parameters:
clid The client handle.
slot The slot number
name The name of the counter to modify.
id The counter attribute to change.
attr Pointer to the attribute's new value
Returns:
NMF_OK Success

-NMF_ENOENT Slot or LAG id not found.

nmf_status_t nmf_policer_list_get ( nmf_client_t  client_id,
int  slot_id,
nm_bv_t policer_list 
)

Get the Counter list.

Parameters:
client_id The client handle.
slot The slot number
policer_list A bit vector to contain the policer ids.

nmf_status_t nmf_policer_rem ( nmf_client_t  client_id,
int  slot_id,
nmf_id_t  policer_id 
)

Remove a policer from the switch.

Parameters:
client_id The client handle.
slot_id The slot number.
policer_id The id of the policer to remove.
Returns:
NMF_OK The specified policer was removed.

NMF_ENOENT The specified policer was not found.


Generated on Wed Sep 1 09:40:57 2010 for NetManage by  doxygen 1.5.6