Generated from osm_node.h with ROBODoc vunknown on Wed Aug 07 15:31:44 2002
TABLE OF CONTENTS
- OpenSM/Node
- OpenSM: Node/osm_node_t
- OpenSM: Node/osm_node_destroy
- OpenSM: Node/osm_node_new
- OpenSM: Node/osm_node_is_lid
- OpenSM: Node/osm_node_get_physp_ptr
- OpenSM: Node/osm_node_get_any_path
- OpenSM: Node/osm_node_get_type
- OpenSM: Node/osm_node_get_remote_node
- OpenSM: Node/osm_node_get_base_lid
- OpenSM: Node/osm_node_get_remote_base_lid
- OpenSM: Node/osm_node_get_remote_type
- OpenSM: Node/osm_node_get_lmc
- OpenSM: Node/osm_node_init_physp
- OpenSM: Node/osm_node_get_discovery_count
- OpenSM: Node/osm_node_reset_discovery_count
- OpenSM: Node/osm_node_discovery_count_inc
- OpenSM: Node/osm_node_get_node_guid
- OpenSM: Node/osm_node_get_num_phys_ports
- OpenSM: Node/osm_node_link
- OpenSM: Node/osm_node_link_exists
- OpenSM: Node/osm_node_has_any_link
- OpenSM: Node/osm_node_link_has_valid_ports
NAME
Node
DESCRIPTION
The Node object encapsulates the information needed by the
OpenSM to manage nodes. The OpenSM allocates one Node object
per node in the IBA subnet.
The Node object is not thread safe, thus callers must provide
serialization.
This object should be treated as opaque and should be
manipulated only through the provided functions.
AUTHOR
Steve King, Intel
NAME
osm_node_t
DESCRIPTION
Node structure.
This object should be treated as opaque and should
be manipulated only through the provided functions.
SYNOPSIS
typedef struct _osm_node
{
cl_map_item_t map_item;
ib_node_info_t node_info;
ib_node_desc_t node_desc;
uint32_t discovery_count;
uint8_t port_tbl_size;
osm_physp_t physp_table[1];
} osm_node_t;
FIELDS
map_item
Linkage structure for cl_qmap. MUST BE FIRST MEMBER!
base
OpenSM base object.
node_info
The IBA defined NodeInfo data for this node.
node_desc
The IBA defined NodeDescription data for this node.
discovery_count
The number of times this switch has been discovered
during the current fabric sweep. This number is reset
to zero at the start of a sweep.
port_tbl_size
The size of the port_table array. This value is one greater
than the number of ports in the node, since port numbers
start with 1 for some bizzare reason.
port_table
Array of physical port objects belonging to this node.
Index is contiguous by local port number.
For switches, port 0 is the always the managment port. (14.2.5.6)
MUST BE LAST MEMBER!
SEE ALSO
Node object
NAME
osm_node_destroy
DESCRIPTION
The osm_node_destroy function destroys a node, releasing
all resources.
SYNOPSIS
void osm_node_delete(
IN OUT osm_node_t** const p_node );
PARAMETERS
p_node
[in][out] Pointer to a Pointer a Node object to destroy.
On return, the pointer to set to NULL.
RETURN VALUE
This function does not return a value.
NOTES
Performs any necessary cleanup of the specified Node object.
This function should only be called after a call to osm_node_new.
SEE ALSO
Node object, osm_node_new
NAME
osm_node_new
DESCRIPTION
The osm_node_new function initializes a Node object for use.
SYNOPSIS
osm_node_t*
osm_node_new(
IN const osm_madw_t* const p_madw );
PARAMETERS
p_madw
[in] Pointer to a osm_madw_t object containing a mad with
the node's NodeInfo attribute. The caller may discard the
osm_madw_t structure after calling osm_node_new.
RETURN VALUES
On success, a pointer to the new initialized osm_node_t structure.
NULL otherwise.
NOTES
SEE ALSO
Node object
NAME
osm_node_is_lid
DESCRIPTION
Indicates if the specified LID belongs to this node.
SYNOPSIS
boolean_t osm_node_is_lid(
IN const osm_node_t* const p_node,
IN const uint16_t lid );
PARAMETERS
p_node
[in] Pointer to an osm_node_t object.
lid
[in] LID value.
RETURN VALUES
TRUE if the specified LID belongs to the node,
FALSE otherwise.
NOTES
SEE ALSO
Node object
NAME
osm_node_get_physp_ptr
DESCRIPTION
Returns a pointer to the physical port object at the
specified local port number.
SYNOPSIS
osm_physp_t*
osm_node_get_physp_ptr(
IN const osm_node_t* const p_node,
IN const uint32_t port_num );
PARAMETERS
p_node
[in] Pointer to an osm_node_t object.
port_num
[in] Local port number.
RETURN VALUES
Returns a pointer to the physical port object at the
specified local port number.
A return value of zero means the port number was out of range.
NOTES
SEE ALSO
Node object
NAME
osm_node_get_any_path
DESCRIPTION
Returns a pointer to the physical port object at the
specified local port number.
SYNOPSIS
osm_dr_path_t*
osm_node_get_any_dr_path_ptr(
IN const osm_node_t* const p_node );
PARAMETERS
p_node
[in] Pointer to an osm_node_t object.
port_num
[in] Local port number.
RETURN VALUES
Returns a pointer to the physical port object at the
specified local port number.
A return value of zero means the port number was out of range.
NOTES
SEE ALSO
Node object
NAME
osm_node_get_type
DESCRIPTION
Returns the type of this node.
SYNOPSIS
uint8_t
osm_node_get_type(
IN const osm_node_t* const p_node );
PARAMETERS
p_node
[in] Pointer to an osm_node_t object.
RETURN VALUES
Returns the IBA defined type of this node.
NOTES
SEE ALSO
Node object
NAME
osm_node_get_remote_node
DESCRIPTION
Returns a pointer to the node on the other end of the
specified port.
Returns NULL if no remote node exists.
SYNOPSIS
osm_node_t*
osm_node_get_remote_node(
IN const osm_node_t* const p_node,
IN const uint8_t port_num,
OUT uint8_t *p_remote_port_num );
PARAMETERS
p_node
[in] Pointer to an osm_node_t object.
port_num
[in] Port number in p_node through which to get the remote node.
p_remote_port_num
[out] Port number in the remote's node through which this
link exists. The caller may specify NULL for this pointer
if the port number isn't needed.
RETURN VALUES
Returns a pointer to the node on the other end of the
specified port.
Returns NULL if no remote node exists.
NOTES
SEE ALSO
Node object
NAME
osm_node_get_base_lid
DESCRIPTION
Returns the LID value of the specified port on this node.
SYNOPSIS
ib_net16_t
osm_node_get_base_lid(
IN const osm_node_t* const p_node,
IN const uint32_t port_num );
PARAMETERS
p_node
[in] Pointer to an osm_node_t object.
port_num
[in] Local port number.
RETURN VALUES
Returns a pointer to the physical port object at the
specified local port number.
A return value of zero means the port number was out of range.
NOTES
SEE ALSO
Node object
NAME
osm_node_get_remote_base_lid
DESCRIPTION
Returns the base LID value of the port on the other side
of the wire from the specified port on this node.
SYNOPSIS
ib_net16_t
osm_node_get_remote_base_lid(
IN const osm_node_t* const p_node,
IN const uint32_t port_num );
PARAMETERS
p_node
[in] Pointer to an osm_node_t object.
port_num
[in] Local port number.
RETURN VALUES
Returns a pointer to the physical port object at the
specified local port number.
A return value of zero means the port number was out of range.
NOTES
SEE ALSO
Node object
NAME
osm_node_get_remote_type
DESCRIPTION
Returns the type of the node on the other side
of the wire from the specified port on this node.
The remote node must exist.
SYNOPSIS
uint8_t
osm_node_get_remote_type(
IN const osm_node_t* const p_node,
IN const uint8_t port_num );
PARAMETERS
p_node
[in] Pointer to an osm_node_t object.
port_num
[in] Local port number.
RETURN VALUES
Returns the type of the node on the other side
of the wire from the specified port on this node.
NOTES
SEE ALSO
Node object
NAME
osm_node_get_lmc
DESCRIPTION
Returns the LMC value of the specified port on this node.
SYNOPSIS
uint8_t
osm_node_get_lmc(
IN const osm_node_t* const p_node,
IN const uint32_t port_num );
PARAMETERS
p_node
[in] Pointer to an osm_node_t object.
port_num
[in] Local port number.
RETURN VALUES
Returns the LMC value of the specified port on this node.
NOTES
SEE ALSO
Node object
NAME
osm_node_init_physp
DESCRIPTION
Initializes a physical port for the given node.
SYNOPSIS
void
osm_node_init_physp(
IN osm_node_t* const p_node,
IN const osm_madw_t* const p_madw );
PARAMETERS
p_node
[in] Pointer to an osm_node_t object.
p_madw
[in] Pointer to a osm_madw_t object containing a mad with
the node's NodeInfo attribute as discovered through the
Physical Port to add to the node. The caller may discard the
osm_madw_t structure after calling osm_node_new.
RETURN VALUES
None.
NOTES
SEE ALSO
Node object, Physical Port object.
NAME
osm_node_get_discovery_count
DESCRIPTION
Returns a pointer to the physical port object at the
specified local port number.
SYNOPSIS
uint32_t
osm_node_get_discovery_count(
IN const osm_node_t* const p_node );
PARAMETERS
p_node
[in] Pointer to an osm_node_t object.
RETURN VALUES
Returns the discovery count for this node.
NOTES
SEE ALSO
Node object
NAME
osm_node_reset_discovery_count
DESCRIPTION
Resets the discovery count for this node to zero.
This operation should be performed at the start of a sweep.
SYNOPSIS
void
osm_node_reset_discovery_count(
IN osm_node_t* const p_node );
PARAMETERS
p_node
[in] Pointer to an osm_node_t object.
RETURN VALUES
None.
NOTES
SEE ALSO
Node object
NAME
osm_node_discovery_count_inc
DESCRIPTION
Increments the discovery count for this node.
SYNOPSIS
void
osm_node_discovery_count_inc(
IN osm_node_t* const p_node );
PARAMETERS
p_node
[in] Pointer to an osm_node_t object.
RETURN VALUES
None.
NOTES
SEE ALSO
Node object
NAME
osm_node_get_node_guid
DESCRIPTION
Returns the node GUID of this node.
SYNOPSIS
ib_net64_t
osm_node_get_node_guid(
IN const osm_node_t* const p_node );
PARAMETERS
p_node
[in] Pointer to an osm_node_t object.
RETURN VALUES
Returns the node GUID of this node.
NOTES
SEE ALSO
Node object
NAME
osm_node_get_num_phys_ports
DESCRIPTION
Returns the number of physical ports on this node.
SYNOPSIS
uint8_t
osm_node_get_num_phys_ports(
IN const osm_node_t* const p_node );
PARAMETERS
p_node
[in] Pointer to an osm_node_t object.
RETURN VALUES
Returns the number of physical nodes on this port.
NOTES
SEE ALSO
Node object
NAME
osm_node_link
DESCRIPTION
Logically connects a node to another node through the specified port.
SYNOPSIS
void
osm_node_link(
IN osm_node_t* const p_node,
IN const uint8_t port_num,
IN osm_node_t* const p_remote_node,
IN const uint8_t remote_port_num );
PARAMETERS
p_node
[in] Pointer to an osm_node_t object.
port_num
[in] Port number in p_node through which to create the link.
p_remote_node
[in] Pointer to the remote port object.
remote_port_num
[in] Port number in the remote's node through which to
create this link.
RETURN VALUES
None.
NOTES
SEE ALSO
Node object
NAME
osm_node_link_exists
DESCRIPTION
Return TRUE if a link exists between the specified nodes on
the specified ports.
Returns FALSE otherwise.
SYNOPSIS
boolean_t
osm_node_link_exists(
IN osm_node_t* const p_node,
IN const uint8_t port_num,
IN osm_node_t* const p_remote_node,
IN const uint8_t remote_port_num );
PARAMETERS
p_node
[in] Pointer to an osm_node_t object.
port_num
[in] Port number in p_node through which to check the link.
p_remote_node
[in] Pointer to the remote port object.
remote_port_num
[in] Port number in the remote's node through which to
check this link.
RETURN VALUES
Return TRUE if a link exists between the specified nodes on
the specified ports.
Returns FALSE otherwise.
NOTES
SEE ALSO
Node object
NAME
osm_node_has_any_link
DESCRIPTION
Return TRUE if a any link exists from the specified nodes on
the specified port.
Returns FALSE otherwise.
SYNOPSIS
boolean_t
osm_node_has_any_link(
IN osm_node_t* const p_node,
IN const uint8_t port_num );
PARAMETERS
p_node
[in] Pointer to an osm_node_t object.
port_num
[in] Port number in p_node through which to check the link.
RETURN VALUES
Return TRUE if a any link exists from the specified nodes on
the specified port.
Returns FALSE otherwise.
NOTES
SEE ALSO
Node object
NAME
osm_node_link_has_valid_ports
DESCRIPTION
Return TRUE if both ports in the link are valid (initialized).
Returns FALSE otherwise.
SYNOPSIS
boolean_t
osm_node_link_has_valid_ports(
IN osm_node_t* const p_node,
IN const uint8_t port_num,
IN osm_node_t* const p_remote_node,
IN const uint8_t remote_port_num );
PARAMETERS
p_node
[in] Pointer to an osm_node_t object.
port_num
[in] Port number in p_node through which to check the link.
RETURN VALUES
Return TRUE if both ports in the link are valid (initialized).
Returns FALSE otherwise.
NOTES
SEE ALSO
Node object