OpenNSL API Guide and Reference Manual
|
Files | |
file | link.h |
file | linkX.h |
Typedefs | |
typedef void(* | opennsl_linkscan_handler_t )(int unit, opennsl_port_t port, opennsl_port_info_t *info) |
typedef enum opennsl_linkscan_mode_e | opennsl_linkscan_mode_t |
opennsl_linkscan_mode_e | |
Enumerations | |
enum | opennsl_linkscan_mode_e { OPENNSL_LINKSCAN_MODE_NONE = 0, OPENNSL_LINKSCAN_MODE_SW = 1, OPENNSL_LINKSCAN_MODE_HW = 2, OPENNSL_LINKSCAN_MODE_COUNT = 3 } |
opennsl_linkscan_mode_e More... | |
Functions | |
int | opennsl_linkscan_detach (int unit) LIB_DLL_EXPORTED |
Terminate linkscan on the specified unit. | |
int | opennsl_linkscan_enable_get (int unit, int *us) LIB_DLL_EXPORTED |
Enable and disable link scanning or set the polling interval. | |
int | opennsl_linkscan_enable_set (int unit, int us) LIB_DLL_EXPORTED |
Enable and disable link scanning or set the polling interval. | |
int | opennsl_linkscan_mode_get (int unit, opennsl_port_t port, int *mode) LIB_DLL_EXPORTED |
Get or set the link scanning mode for a port. | |
int | opennsl_linkscan_mode_set (int unit, opennsl_port_t port, int mode) LIB_DLL_EXPORTED |
Get or set the link scanning mode for a port. | |
int | opennsl_linkscan_mode_set_pbm (int unit, opennsl_pbmp_t pbm, int mode) LIB_DLL_EXPORTED |
Get or set the link scanning mode for a port. | |
int | opennsl_linkscan_register (int unit, opennsl_linkscan_handler_t f) LIB_DLL_EXPORTED |
Register and unregister link notification callouts. | |
int | opennsl_linkscan_unregister (int unit, opennsl_linkscan_handler_t f) LIB_DLL_EXPORTED |
Register and unregister link notification callouts. | |
typedef void(* opennsl_linkscan_handler_t)(int unit, opennsl_port_t port, opennsl_port_info_t *info) |
typedef enum opennsl_linkscan_mode_e opennsl_linkscan_mode_t |
opennsl_linkscan_mode_e
int opennsl_linkscan_detach | ( | int | unit | ) |
Terminate linkscan on the specified unit.
unit | [IN] Unit number. |
OPENNSL_E_NONE | |
OPENNSL_E_XXX | Operation failed, linkscan state is undefined. |
int opennsl_linkscan_enable_get | ( | int | unit, |
int * | us | ||
) |
Enable and disable link scanning or set the polling interval.
unit | [IN] Unit number. |
us | [OUT] (for _set) Minimum time between software link scan cycles in micro-seconds. 0 indicates linkscan is disabled. |
OPENNSL_E_NONE | |
OPENNSL_E_MEMORY | |
OPENNSL_E_XXX |
int opennsl_linkscan_enable_set | ( | int | unit, |
int | us | ||
) |
Enable and disable link scanning or set the polling interval.
unit | [IN] Unit number. |
us | [IN] (for _set) Minimum time between software link scan cycles in micro-seconds. 0 indicates linkscan is disabled. |
OPENNSL_E_NONE | |
OPENNSL_E_MEMORY | |
OPENNSL_E_XXX |
int opennsl_linkscan_mode_get | ( | int | unit, |
opennsl_port_t | port, | ||
int * | mode | ||
) |
Get or set the link scanning mode for a port.
unit | [IN] Unit number. |
port | [IN] Device port number to set or get the mode of |
mode | [OUT] (for _set and _set_pbm) Link scan mode, see table =OPENNSL_LINKSCAN_MODE_e . |
OPENNSL_E_NONE | |
OPENNSL_E_PORT | Invalid port |
OPENNSL_E_PARAM | Invalid mode |
OPENNSL_E_UNAVAIL | Mode requested is not support |
OPENNSL_E_XXX | Operation failed |
int opennsl_linkscan_mode_set | ( | int | unit, |
opennsl_port_t | port, | ||
int | mode | ||
) |
Get or set the link scanning mode for a port.
unit | [IN] Unit number. |
port | [IN] Device port number to set or get the mode of |
mode | [IN] (for _set and _set_pbm) Link scan mode, see table =OPENNSL_LINKSCAN_MODE_e . |
OPENNSL_E_NONE | |
OPENNSL_E_PORT | Invalid port |
OPENNSL_E_PARAM | Invalid mode |
OPENNSL_E_UNAVAIL | Mode requested is not support |
OPENNSL_E_XXX | Operation failed |
int opennsl_linkscan_mode_set_pbm | ( | int | unit, |
opennsl_pbmp_t | pbm, | ||
int | mode | ||
) |
Get or set the link scanning mode for a port.
unit | [IN] Unit number. |
pbm | [IN] Port bit map of ports to set the mode on |
mode | [IN] (for _set and _set_pbm) Link scan mode, see table =OPENNSL_LINKSCAN_MODE_e . |
OPENNSL_E_NONE | |
OPENNSL_E_PORT | Invalid port |
OPENNSL_E_PARAM | Invalid mode |
OPENNSL_E_UNAVAIL | Mode requested is not support |
OPENNSL_E_XXX | Operation failed |
int opennsl_linkscan_register | ( | int | unit, |
opennsl_linkscan_handler_t | f | ||
) |
Register and unregister link notification callouts.
unit | [IN] Unit number. |
f | [IN] OPENNSL callback function pointer (see =opennsl_linkscan_handler_t) |
OPENNSL_E_NONE | |
OPENNSL_E_MEMORY |
int opennsl_linkscan_unregister | ( | int | unit, |
opennsl_linkscan_handler_t | f | ||
) |
Register and unregister link notification callouts.
unit | [IN] Unit number. |
f | [IN] OPENNSL callback function pointer (see =opennsl_linkscan_handler_t) |
OPENNSL_E_NONE | |
OPENNSL_E_MEMORY |