46 void *arg_out, uint32_t arg_out_length,
void *sport);
71 ocs_domain_t * domain = sport->domain;
81 sport->created = FALSE;
105 if (sport->instance_index == index) {
160 ocs_sport_t *sport = (ocs_sport_t *)
object;
174 if ((node->mgmt_functions) && (node->mgmt_functions->get_list_handler)) {
175 node->mgmt_functions->get_list_handler(textbuf, node);
188 ocs_sport_t *sport = (ocs_sport_t *)
object;
193 snprintf(qualifier,
sizeof(qualifier),
"%s/sport[%d]", parent, sport->index);
196 if (ocs_strncmp(name, qualifier, strlen(qualifier)) == 0) {
197 char *unqualified_name = name + strlen(qualifier) +1;
200 if (ocs_strcmp(unqualified_name,
"display_name") == 0) {
203 }
else if (ocs_strcmp(unqualified_name,
"mac") == 0) {
210 if ((node->mgmt_functions) && (node->mgmt_functions->get_handler)) {
211 retval = node->mgmt_functions->get_handler(textbuf, qualifier, name, node);
231 ocs_sport_t *sport = (ocs_sport_t *)
object;
240 if ((node->mgmt_functions) && (node->mgmt_functions->get_all_handler)) {
241 node->mgmt_functions->get_all_handler(textbuf, node);
253 ocs_sport_t *sport = (ocs_sport_t *)
object;
257 snprintf(qualifier,
sizeof(qualifier),
"%s/sport[%d]", parent, sport->index);
260 if (ocs_strncmp(name, qualifier, strlen(qualifier)) == 0) {
265 if ((node->mgmt_functions) && (node->mgmt_functions->set_handler)) {
266 retval = node->mgmt_functions->set_handler(qualifier, name, value, node);
281 void *arg_out, uint32_t arg_out_length,
void *
object)
284 ocs_sport_t *sport = (ocs_sport_t *)
object;
288 snprintf(qualifier,
sizeof(qualifier),
"%s.sport%d", parent, sport->index);
291 if (ocs_strncmp(action, qualifier, strlen(qualifier)) == 0) {
296 if ((node->mgmt_functions) && (node->mgmt_functions->exec_handler)) {
297 retval = node->mgmt_functions->exec_handler(qualifier, action, arg_in, arg_in_length,
298 arg_out, arg_out_length, node);
static int32_t ocs_sport_lock_try(ocs_sport_t *sport)
static void ocs_sport_unlock(ocs_sport_t *sport)
static void ocs_sport_lock(ocs_sport_t *sport)
int ocs_mgmt_sport_set(char *parent, char *name, char *value, void *sport)
int ocs_ddump_node(ocs_textbuf_t *textbuf, ocs_node_t *node)
Generate node ddump data.
void ocs_mgmt_sport_get_all(ocs_textbuf_t *textbuf, void *sport)
void ocs_cxn_force_free(ocs_cxn_t *cxn)
Free memory resources of a node object.
ocs_mgmt_functions_t sport_mgmt_functions
void ocs_ddump_section(ocs_textbuf_t *textbuf, const char *name, uint32_t instance)
Generate driver dump section start data.
void ocs_mgmt_start_section(ocs_textbuf_t *textbuf, const char *name, int index)
Generate the beginning of a numbered section in a management XML document.
int ocs_ddump_sport(ocs_textbuf_t *textbuf, ocs_sli_port_t *sport)
Generate sli port ddump.
static void * ocs_list_remove(ocs_list_t *list, void *item)
Remove an item from the list.
#define ocs_list_foreach_safe(list, item, nxt)
Iterate a linked list safely.
void ocs_mgmt_end_section(ocs_textbuf_t *textbuf, const char *name, int index)
Generate the indexed end of a section in a management XML document.
void ocs_sport_force_free(ocs_sport_t *sport)
Free memory resources of a SLI port object.
int ocs_mgmt_sport_get(ocs_textbuf_t *textbuf, char *parent, char *name, void *sport)
void ocs_mgmt_sport_list(ocs_textbuf_t *textbuf, void *sport)
void ocs_ddump_endsection(ocs_textbuf_t *textbuf, const char *name, uint32_t instance)
Generate driver dump section end data.
ocs_mgmt_get_list_handler get_list_handler
ocs_sport_t * ocs_sport_get_instance(ocs_domain_t *domain, uint32_t index)
Return a SLI port object, given an instance index.
void ocs_scsi_tgt_ddump(ocs_textbuf_t *textbuf, ocs_scsi_ddump_type_e type, void *obj)
int ocs_mgmt_sport_exec(char *parent, char *action, void *arg_in, uint32_t arg_in_length, void *arg_out, uint32_t arg_out_length, void *sport)
static void ocs_domain_lock(ocs_domain_t *domain)
void ocs_mgmt_emit_string(ocs_textbuf_t *textbuf, int access, const char *name, const char *value)
Generate a property with a string value in a management XML document.
#define ocs_list_foreach(list, item)
Iterate a linked list.
void ocs_mgmt_emit_property_name(ocs_textbuf_t *textbuf, int access, const char *name)
Generate a property, with no value, in a management XML document.
void ocs_ddump_value(ocs_textbuf_t *textbuf, const char *name, const char *fmt,...)
Generate driver dump data for a given value.
static void ocs_domain_unlock(ocs_domain_t *domain)