Switch Management Functions

Functions to administer the state and configuration of a switch. More...

Data Structures

union  nmf_sw_attr_value
 Swith Attribute Value Types. More...
union  nmf_slot_attr_value
 Slot attribute values. More...

Enumerations

enum  nmf_sw_attr_id { NMF_SW_ATTR_SLOT_COUNT = 1, NMF_SW_ATTR_CFG_PATH }
 Swith Attribute Identifiers. More...
enum  nmf_slot_state { , NMF_SLOT_STATE_PWR_DOWN, NMF_SLOT_STATE_RESET, NMF_SLOT_STATE_READY }
 Slot state values. More...
enum  nmf_spanning_tree_mode { NMF_SPANNING_TREE_SHARED = 1, NMF_SPANNING_TREE_PER_VLAN, NMF_SPANNING_TREE_MULTIPLE }
 Spanning tree modes. More...
enum  nmf_flood_policy {
  NMF_FLOOD_FWD = 1, NMF_FLOOD_FWD_AND_LOG, NMF_FLOOD_LOG, NMF_FLOOD_DROP,
  NMF_FLOOD_PER_PORT
}
 Policy for non FID FWD packets. More...
enum  nmf_routing_hash {
  NMF_ROUTING_HASH_SYM = 1, NMF_ROUTING_HASH_SIP, NMF_ROUTING_HASH_DIP, NMF_ROUTING_HASH_IP_PROTO,
  NMF_ROUTING_HASH_TCP, NMF_ROUTING_HASH_UDP, NMF_ROUTING_HASH_L4SRC_PORT, NMF_ROUTING_HASH_L4DST_PORT,
  NMF_ROUTING_HASH_PROTO_1, NMF_ROUTING_HASH_PROTO_2
}
 Routing hash fields. More...
enum  nmf_ip_options_policy { NMF_IP_OPTIONS_FWD = 1, NMF_IP_OPTIONS_LOG, NMF_IP_OPTIONS_LOG_MCAST, NMF_IP_OPTIONS_LOG_UCAST }
enum  nmf_slot_attr_id {
  NMF_SLOT_ATTR_STATE = 1, NMF_SLOT_ATTR_CPU_ETHADDR, NMF_SLOT_ATTR_VENDOR, NMF_SLOT_ATTR_FAMILY,
  NMF_SLOT_ATTR_MODEL, NMF_SLOT_ATTR_VERS, NMF_SLOT_ATTR_PORT_COUNT, NMF_SLOT_ATTR_MAX_MIRROR,
  NMF_SLOT_ATTR_MAX_LAG, NMF_SLOT_ATTR_MAX_LAG_HASH, NMF_SLOT_ATTR_MAX_VLAN, NMF_SLOT_ATTR_SPANNING_TREE_MODE,
  NMF_SLOT_ATTR_TRAP_IEEE_8021X, NMF_SLOT_ATTR_TRAP_IEEE_BPDU, NMF_SLOT_ATTR_TRAP_IEEE_LACP, NMF_SLOT_ATTR_TRAP_IEEE_GARP,
  NMF_SLOT_ATTR_TRAP_IEEE_OTHER, NMF_SLOT_ATTR_DROP_PAUSE, NMF_SLOT_ATTR_BCAST_FLOOD, NMF_SLOT_ATTR_MCAST_FLOOD,
  NMF_SLOT_ATTR_UCAST_FLOOD, NMF_SLOT_ATTR_FRAME_AGING_TIME_MSEC, NMF_SLOT_ATTR_ROUTING_HASH, NMF_SLOT_ATTR_ROUTING_HASH_ROTATION,
  NMF_SLOT_ATTR_ROUTING_HASH_PROTO_1, NMF_SLOT_ATTR_ROUTING_HASH_PROTO_2, NMF_SLOT_ATTR_ROUTING_HASH_FLOW_DIFFSERV_MASK, NMF_SLOT_ATTR_ROUTING_HASH_FLOW_USER_MASK,
  NMF_SLOT_ATTR_ROUTING_HASH_FLOW_LABEL_MASK, NMF_SLOT_ATTR_IP_OPTIONS_DISPOSITION, NMF_SLOT_ATTR_LBG_MODE, NMF_SLOT_ATTR_AUTH_MAC_ID_TRIGGER,
  NMF_SLOT_ATTR_REDIRECT_CPU_TRAFFIC, NMF_SLOT_ATTR_IFG_PENALTY
}
 Slot attribute identifiers. More...

Functions

nmf_status_t nmf_sw_attr_get (nmf_client_t client_id, enum nmf_sw_attr_id attr_id, union nmf_sw_attr_value *value)
 Get the value of a switch attribute.
nmf_status_t nmf_sw_cfg_save (nmf_client_t client_id, char *cfg_name)
 Save the switch configuration.
nmf_status_t nmf_sw_cfg_restore (nmf_client_t client_id, char *cfg_name)
 Restore the switch configuration.
nmf_status_t nmf_slot_reset (nmf_client_t client_id, int slot)
 Reset the Slot.
nmf_status_t nmf_slot_attr_get (nmf_client_t client_id, int slot, enum nmf_slot_attr_id attr_id, union nmf_slot_attr_value *value)
 Get a Slot attribute.
nmf_status_t nmf_slot_attr_set (nmf_client_t client_id, int slot, enum nmf_slot_attr_id attr_id, union nmf_slot_attr_value *value)
 Set a Slot attribute.

Detailed Description

Functions to administer the state and configuration of a switch.


Enumeration Type Documentation

Policy for non FID FWD packets.

Describes the forwardng policy for packets whose destination address is not found in the FID table for the VLAN.

Enumerator:
NMF_FLOOD_FWD  Flood packets that are not FID forwarded
NMF_FLOOD_FWD_AND_LOG  Flood and log to the CPU packets that are not FID forwarded
NMF_FLOOD_LOG  Log to the CPU packets that are not FID forwarded
NMF_FLOOD_DROP  Drop packets that are not FID forwarded
NMF_FLOOD_PER_PORT  When used with the global configuration, indicates that policy is configured per-port.

Definition at line 308 of file nmf.h.

Enumerator:
NMF_IP_OPTIONS_FWD  Forward IP traffic normally.
NMF_IP_OPTIONS_LOG  Trap all IP traffic with options the CPU.
NMF_IP_OPTIONS_LOG_MCAST  Trap all MCAST IP traffic with options the CPU.
NMF_IP_OPTIONS_LOG_UCAST  Trap all UCAST IP traffic with options the CPU.

Definition at line 351 of file nmf.h.

Routing hash fields.

Configures hashing of L3/L4 headers for ECMP and LAG. The following bits may be ORed together to define the hash key:

Enumerator:
NMF_ROUTING_HASH_SYM  Force the hash to be symmetric with respect to SIP/DIP and L4SRC/L4DST
NMF_ROUTING_HASH_SIP  Hash includes the source IP address.
NMF_ROUTING_HASH_DIP  Hash includes the destination IP address.
NMF_ROUTING_HASH_IP_PROTO  Hash includes the IP protocol field.
NMF_ROUTING_HASH_TCP  Enable the L4DST and L4SRC fields when the protocol is TCP.
NMF_ROUTING_HASH_UDP  Enable the L4DST and L4SRC fields when the protocol is UDP.
NMF_ROUTING_HASH_L4SRC_PORT  Include the L4 source port.
NMF_ROUTING_HASH_L4DST_PORT  Include the L4 destination port.
NMF_ROUTING_HASH_PROTO_1  Honor the NMF_SLOT_ATTR_ROUTING_HASH_PROTO_1 slot setting
NMF_ROUTING_HASH_PROTO_2  Honor the NMF_SLOT_ATTR_ROUTING_HASH_PROTO_2 slot setting

Definition at line 328 of file nmf.h.

Slot attribute identifiers.

Enumerator:
NMF_SLOT_ATTR_STATE  The state of the switch in the slot
NMF_SLOT_ATTR_CPU_ETHADDR  The Ethernet address for management datagrams emitted on this slot
NMF_SLOT_ATTR_VENDOR  The vendor name for the switch
NMF_SLOT_ATTR_FAMILY  The vendor specific device family
NMF_SLOT_ATTR_MODEL  The vendor specific device model
NMF_SLOT_ATTR_VERS  The vendor specific device version
NMF_SLOT_ATTR_PORT_COUNT  The number of ports present on this slot
NMF_SLOT_ATTR_MAX_MIRROR  The maximum number of mirror ports
NMF_SLOT_ATTR_MAX_LAG  The maximum number of mirror Link Aggregation Groups
NMF_SLOT_ATTR_MAX_LAG_HASH  The maximum number of mirror Link Aggregation hash functions
NMF_SLOT_ATTR_MAX_VLAN  The maximum number of Virtual LAN
NMF_SLOT_ATTR_SPANNING_TREE_MODE  Multiple spanning tree mode.
NMF_SLOT_ATTR_TRAP_IEEE_8021X  Trapping of 802.1x frames to the CPU.
NMF_SLOT_ATTR_TRAP_IEEE_BPDU  Trapping of spanning tree BPDU frames to the CPU.
NMF_SLOT_ATTR_TRAP_IEEE_LACP  Trapping of 802.3ad link aggregation protocol frames to the CPU.
NMF_SLOT_ATTR_TRAP_IEEE_GARP  Trapping of GARP frames to the CPU.
NMF_SLOT_ATTR_TRAP_IEEE_OTHER  Trapping of all IEEE reserved multicast frames (not otherwise enumerated) to the CPU:
NMF_SLOT_ATTR_DROP_PAUSE  Frames with Ethertype 8808 and MAC control address 01-80-c2-00-00-01 are discarded. If disabled, frames with Ethertype 8808 and MAC control address 01-80-c2-00-00-01 are treated as ordinary multicast.
NMF_SLOT_ATTR_BCAST_FLOOD  Broadcast flooding control.
NMF_SLOT_ATTR_MCAST_FLOOD  Multicast flooding control.
NMF_SLOT_ATTR_UCAST_FLOOD  Unicast flooding control.
NMF_SLOT_ATTR_FRAME_AGING_TIME_MSEC  Frame timeout in milliseconds. This value is used to determine whether a frame has been in the switch element for too long. Once the timer has expired, the frame will be discarded. Specify zero to disable the feature.
NMF_SLOT_ATTR_ROUTING_HASH  A bit field defining the routing hash
NMF_SLOT_ATTR_ROUTING_HASH_ROTATION  One of three 12-bit hash rotations for use in ECMP binning. The attribute value may range from 0 to 2 with a default value of 0.
NMF_SLOT_ATTR_ROUTING_HASH_PROTO_1  Specifies an L4 protocol value that when matched will enable teh NMF_ROUTING_HASH_PROTO_1 bit
NMF_SLOT_ATTR_ROUTING_HASH_PROTO_2  Specifies an L4 protocol value that when matched will enable teh NMF_ROUTING_HASH_PROTO_2 bit
NMF_SLOT_ATTR_ROUTING_HASH_FLOW_DIFFSERV_MASK  Masks the IPv4 DiffServ field in the L34 hash function. The attribute value is a 6 bit mask with a default value of 0x00.
NMF_SLOT_ATTR_ROUTING_HASH_FLOW_USER_MASK  Masks the ISL tag's USER field in the L34 hash function. The attribute value is an 8 bit mask with a default value of 0x00.
NMF_SLOT_ATTR_ROUTING_HASH_FLOW_LABEL_MASK  Masks the IPv6 Flow Label field in the L34 hash function. The attribute value is a 20 bit mask with a default value of 0x00000.
NMF_SLOT_ATTR_IP_OPTIONS_DISPOSITION  Indicates the disposition for IP frames with options.
NMF_SLOT_ATTR_LBG_MODE  Indicates which load balancing group mode to use.
NMF_SLOT_ATTR_AUTH_MAC_ID_TRIGGER  The id of the trigger used to flag an authenticated MAC address. This attribute is read only.
NMF_SLOT_ATTR_REDIRECT_CPU_TRAFFIC  Indicates which logical port to redirect CPU traffic to. The logical port can be a phyical port or a LAG port.
NMF_SLOT_ATTR_IFG_PENALTY  Defines the number of bytes that will be added to each frame for the purpose of ingress or egress rate-limiter and DRR scheduling.

Definition at line 371 of file nmf.h.

Slot state values.

Enumerator:
NMF_SLOT_STATE_PWR_DOWN  No device present in slot
NMF_SLOT_STATE_RESET  Device powered down in slot
NMF_SLOT_STATE_READY  Device inserted, but not initialized

Device ready for accepting configuration requests

Definition at line 273 of file nmf.h.

Spanning tree modes.

Per-port spanning tree states are set using ''nmf_port_attr_set''.

Enumerator:
NMF_SPANNING_TREE_SHARED  All VLANs share a single spanning tree instance and source MAC addresses are learned globally (not per-VLAN).
NMF_SPANNING_TREE_PER_VLAN  Each VLAN has its own spanning tree instance and source MAC addresses are learned per-VLAN.
NMF_SPANNING_TREE_MULTIPLE  VLANs are assigned to spanning tree instances in any combination (all to one, each to its own or some VLANs sharing one instance while other VLANs share another instance). Source MAC addresses are learned per-VLAN.

Definition at line 285 of file nmf.h.

Swith Attribute Identifiers.

Enumerator:
NMF_SW_ATTR_SLOT_COUNT  The number of slots present in the switch chassis.
NMF_SW_ATTR_CFG_PATH  The currently active configuration name for the switch.

Definition at line 213 of file nmf.h.


Function Documentation

nmf_status_t nmf_slot_attr_get ( nmf_client_t  client_id,
int  slot,
enum nmf_slot_attr_id  attr_id,
union nmf_slot_attr_value value 
)

Get a Slot attribute.

Parameters:
client_id The client handle.
slot The slot number
attr_id The attribute identifier
value Pointer to union where the attribute value will be stored.
Returns:
NMF_OK Success

-NMF_EINVAL An invalid parameter was specified.

nmf_status_t nmf_slot_attr_set ( nmf_client_t  client_id,
int  slot,
enum nmf_slot_attr_id  attr_id,
union nmf_slot_attr_value value 
)

Set a Slot attribute.

Parameters:
client_id The client handle.
slot The slot number
attr_id The attribute identifier
value Pointer to memory containing the attribute value
Returns:
NMF_OK Success

-NMF_EINVAL Invalid parameter

nmf_status_t nmf_slot_reset ( nmf_client_t  client_id,
int  slot 
)

Reset the Slot.

Parameters:
client_id The client handle.
slot The slot number
Returns:
NMF_OK Success

-NMF_EINVAL An invalid parameter was specified.

nmf_status_t nmf_sw_attr_get ( nmf_client_t  client_id,
enum nmf_sw_attr_id  attr_id,
union nmf_sw_attr_value value 
)

Get the value of a switch attribute.

Parameters:
client_id The client handle.
attr_id Identifier for the attribute.
value Pointer to Union of attribute values.
Returns:
NMF_OK Success

-NMF_EINVAL Invalid parameter.

nmf_status_t nmf_sw_cfg_restore ( nmf_client_t  client_id,
char *  cfg_name 
)

Restore the switch configuration.

Restores a previously saved switch configuration.

Parameters:
client_id The client handle.
cfg_name The configuration name.
Returns:
NMF_OK Success

-NMF_EINVAL Invalid parameter.

-NMF_ENOENT The specified configuration does not exist.

nmf_status_t nmf_sw_cfg_save ( nmf_client_t  client_id,
char *  cfg_name 
)

Save the switch configuration.

Saves the current switch configuration and associate it with a cfg_name that can later be restored. The cfg_name is logically equivalent to a path name.

Parameters:
client_id The client handle.
cfg_name A string specifying the configuration name as a file system path.
Returns:
NMF_OK Success

-NMF_EINVAL Invalid parameter.

-NMF_NOMEM There is no more room on the switch.


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