ONLP
Open Network Linux Platform APIs
|
Functions | |
int | onlp_sfpi_sw_init (void) |
Software initialization of the SFP module. | |
int | onlp_sfpi_hw_init (uint32_t flags) |
Hardware initialization of the SFP module. More... | |
int | onlp_sfpi_sw_denit (void) |
Deinitialize the chassis software module. More... | |
int | onlp_sfpi_bitmap_get (onlp_sfp_bitmap_t *bmap) |
Get the bitmap of SFP-capable port numbers. More... | |
int | onlp_sfpi_type_get (onlp_oid_id_t id, onlp_sfp_type_t *rtype) |
Determine the SFP connector type. More... | |
int | onlp_sfpi_is_present (onlp_oid_id_t id) |
Determine if an SFP is present. More... | |
int | onlp_sfpi_presence_bitmap_get (onlp_sfp_bitmap_t *dst) |
Return the presence bitmap for all SFP ports. More... | |
int | onlp_sfpi_rx_los_bitmap_get (onlp_sfp_bitmap_t *dst) |
Return the RX_LOS bitmap for all SFP ports. More... | |
int | onlp_sfpi_dev_read (onlp_oid_id_t id, int devaddr, int addr, uint8_t *dst, int len) |
Read bytes from the target device on the given SFP port. More... | |
int | onlp_sfpi_dev_write (onlp_oid_id_t id, int devaddr, int addr, uint8_t *src, int len) |
Write bytes to the target device on the given SFP port. More... | |
int | onlp_sfpi_dev_readb (onlp_oid_id_t id, int devaddr, int addr) |
Read a byte from the target device on the given SFP port. More... | |
int | onlp_sfpi_dev_writeb (onlp_oid_id_t id, int devaddr, int addr, uint8_t value) |
Write a byte to the target device on the given SFP port. More... | |
int | onlp_sfpi_dev_readw (onlp_oid_id_t id, int devaddr, int addr) |
Read a word from the target device on the given SFP port. More... | |
int | onlp_sfpi_dev_writew (onlp_oid_id_t id, int devaddr, int addr, uint16_t value) |
Write a word to the target device on the given SFP port. More... | |
int | onlp_sfpi_post_insert (onlp_oid_id_t id, sff_info_t *info) |
Perform any actions required after an SFP is inserted. More... | |
int | onlp_sfpi_control_supported (onlp_oid_id_t id, onlp_sfp_control_t control, int *rv) |
Returns whether or not the given control is supported on the given port. More... | |
int | onlp_sfpi_control_set (onlp_oid_id_t id, onlp_sfp_control_t control, int value) |
Set an SFP control. More... | |
int | onlp_sfpi_control_get (onlp_oid_id_t id, onlp_sfp_control_t control, int *value) |
Get an SFP control. More... | |
int | onlp_sfpi_port_map (onlp_oid_id_t id, int *rport) |
Remap SFP user SFP port numbers before calling the SFPI interface. More... | |
int | onlp_sfpi_hdr_get (onlp_oid_id_t id, onlp_oid_hdr_t *hdr) |
Get the SFP's OID header. More... | |
int onlp_sfpi_bitmap_get | ( | onlp_sfp_bitmap_t * | bmap | ) |
Get the bitmap of SFP-capable port numbers.
[out] | bmap | Receives the bitmap. |
int onlp_sfpi_control_get | ( | onlp_oid_id_t | id, |
onlp_sfp_control_t | control, | ||
int * | value | ||
) |
Get an SFP control.
id | The SFP Port ID. | |
control | The control | |
[out] | value | Receives the current value. |
int onlp_sfpi_control_set | ( | onlp_oid_id_t | id, |
onlp_sfp_control_t | control, | ||
int | value | ||
) |
Set an SFP control.
id | The SFP Port ID. |
control | The control. |
value | The value. |
int onlp_sfpi_control_supported | ( | onlp_oid_id_t | id, |
onlp_sfp_control_t | control, | ||
int * | rv | ||
) |
Returns whether or not the given control is supported on the given port.
id | The SFP Port ID. | |
control | The control. | |
[out] | rv | Receives 1 if supported, 0 if not supported. |
int onlp_sfpi_dev_read | ( | onlp_oid_id_t | id, |
int | devaddr, | ||
int | addr, | ||
uint8_t * | dst, | ||
int | len | ||
) |
Read bytes from the target device on the given SFP port.
id | The SFP Port ID. | |
devaddr | The device address. | |
addr | Read offset. | |
[out] | dst | Receives the data. |
len | Read length. |
int onlp_sfpi_dev_readb | ( | onlp_oid_id_t | id, |
int | devaddr, | ||
int | addr | ||
) |
Read a byte from the target device on the given SFP port.
id | The SFP Port ID. |
devaddr | The device address. |
addr | The read address. |
int onlp_sfpi_dev_readw | ( | onlp_oid_id_t | id, |
int | devaddr, | ||
int | addr | ||
) |
Read a word from the target device on the given SFP port.
id | The SFP Port ID. |
devaddr | The device address. |
addr | The read address. |
int onlp_sfpi_dev_write | ( | onlp_oid_id_t | id, |
int | devaddr, | ||
int | addr, | ||
uint8_t * | src, | ||
int | len | ||
) |
Write bytes to the target device on the given SFP port.
id | The SFP Port ID. |
devaddr | The device address. |
addr | Write offset. |
src | The bytes to write. |
len | Write length. |
int onlp_sfpi_dev_writeb | ( | onlp_oid_id_t | id, |
int | devaddr, | ||
int | addr, | ||
uint8_t | value | ||
) |
Write a byte to the target device on the given SFP port.
id | The SFP Port ID. |
devaddr | The device address. |
addr | The write address. |
value | The write value. |
int onlp_sfpi_dev_writew | ( | onlp_oid_id_t | id, |
int | devaddr, | ||
int | addr, | ||
uint16_t | value | ||
) |
Write a word to the target device on the given SFP port.
id | The SFP Port ID. |
devaddr | The device address. |
addr | The write address. |
value | The write value. |
int onlp_sfpi_hdr_get | ( | onlp_oid_id_t | id, |
onlp_oid_hdr_t * | hdr | ||
) |
Get the SFP's OID header.
id | The SFP oid. | |
[out] | hdr | Receives the header. |
int onlp_sfpi_hw_init | ( | uint32_t | flags | ) |
Hardware initialization of the SFP module.
flags | The hardware initialization flags. |
int onlp_sfpi_is_present | ( | onlp_oid_id_t | id | ) |
Determine if an SFP is present.
id | The SFP Port ID. |
int onlp_sfpi_port_map | ( | onlp_oid_id_t | id, |
int * | rport | ||
) |
Remap SFP user SFP port numbers before calling the SFPI interface.
id | The SFP Port ID. | |
[out] | rport | Receives the new port. |
int onlp_sfpi_post_insert | ( | onlp_oid_id_t | id, |
sff_info_t * | info | ||
) |
Perform any actions required after an SFP is inserted.
id | The SFP Port ID. |
info | The SFF Module information structure. |
int onlp_sfpi_presence_bitmap_get | ( | onlp_sfp_bitmap_t * | dst | ) |
Return the presence bitmap for all SFP ports.
[out] | dst | Receives the presence bitmap. |
int onlp_sfpi_rx_los_bitmap_get | ( | onlp_sfp_bitmap_t * | dst | ) |
Return the RX_LOS bitmap for all SFP ports.
[out] | dst | Receives the RX_LOS bitmap. |
int onlp_sfpi_sw_denit | ( | void | ) |
Deinitialize the chassis software module.
int onlp_sfpi_type_get | ( | onlp_oid_id_t | id, |
onlp_sfp_type_t * | rtype | ||
) |
Determine the SFP connector type.
id | The SFP Port ID. | |
[out] | rtype | Receives the connector type. |