Functions | |
| 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. More... | |
| void | ocs_mgmt_start_unnumbered_section (ocs_textbuf_t *textbuf, const char *name) |
| Generate the beginning of an unnumbered section in a management XML document. More... | |
| void | ocs_mgmt_end_unnumbered_section (ocs_textbuf_t *textbuf, const char *name) |
| Generate the end of a section in a management XML document. More... | |
| 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. More... | |
| void | ocs_mgmt_emit_property_name (ocs_textbuf_t *textbuf, int mode, const char *name) |
| Generate a property, with no value, in a management XML document. More... | |
| void | ocs_mgmt_emit_string (ocs_textbuf_t *textbuf, int mode, const char *name, const char *value) |
| Generate a property with a string value in a management XML document. More... | |
| void | ocs_mgmt_emit_int (ocs_textbuf_t *textbuf, int mode, const char *name, const char *fmt,...) |
| Generate a property with an integer value in a management XML document. More... | |
| void | ocs_mgmt_emit_boolean (ocs_textbuf_t *textbuf, int mode, const char *name, int value) |
| Generate a property with a boolean value in a management XML document. More... | |
| void | ocs_mgmt_get_list (ocs_t *ocs, ocs_textbuf_t *textbuf) |
| get a list of mgmt items supported by the driver More... | |
| int | ocs_mgmt_get (ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) |
| return the value of a mgmt item More... | |
| int | ocs_mgmt_set (ocs_t *ocs, char *name, char *value) |
| set the value of a mgmt item More... | |
| int | ocs_mgmt_exec (ocs_t *ocs, char *action, void *arg_in, uint32_t arg_in_length, void *arg_out, uint32_t arg_out_length) |
| perform a management action More... | |
| void ocs_mgmt_emit_boolean | ( | ocs_textbuf_t * | textbuf, |
| int | mode, | ||
| const char * | name, | ||
| int | value | ||
| ) |
Generate a property with a boolean value in a management XML document.
| textbuf | Pointer to the driver dump text buffer. |
| mode | Defines whether the property is read(r)/write(w)/executable(x). |
| name | Name of the property. |
| value | Boolean value to be added to the textbuf. |
Definition at line 213 of file ocs_mgmt_common.c.
| void ocs_mgmt_emit_int | ( | ocs_textbuf_t * | textbuf, |
| int | mode, | ||
| const char * | name, | ||
| const char * | fmt, | ||
| ... | |||
| ) |
Generate a property with an integer value in a management XML document.
| textbuf | Pointer to driver dump text buffer. |
| mode | Defines whether the property is read(r)/write(w)/executable(x). |
| name | Name of the property. |
| fmt | A printf format for formatting the integer value. |
Definition at line 185 of file ocs_mgmt_common.c.
| void ocs_mgmt_emit_property_name | ( | ocs_textbuf_t * | textbuf, |
| int | mode, | ||
| const char * | name | ||
| ) |
Generate a property, with no value, in a management XML document.
| textbuf | Pointer to the driver dump text buffer. |
| mode | Defines whether the property is read(r)/write(w)/executable(x). |
| name | Name of the property. |
Definition at line 143 of file ocs_mgmt_common.c.
| void ocs_mgmt_emit_string | ( | ocs_textbuf_t * | textbuf, |
| int | mode, | ||
| const char * | name, | ||
| const char * | value | ||
| ) |
Generate a property with a string value in a management XML document.
| textbuf | Pointer to the driver dump text buffer. |
| mode | Defines whether the property is read(r)/write(w)/executable(x). |
| name | Name of the property. |
| value | Value of the property. |
Definition at line 164 of file ocs_mgmt_common.c.
| 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.
| textbuf | Pointer to the driver dump text buffer. |
| name | Name of the section. |
| index | Index number of this instance of the section. |
Definition at line 120 of file ocs_mgmt_common.c.
| void ocs_mgmt_end_unnumbered_section | ( | ocs_textbuf_t * | textbuf, |
| const char * | name | ||
| ) |
Generate the end of a section in a management XML document.
| textbuf | Pointer to the driver dump text buffer. |
| name | Name of the section. |
Definition at line 100 of file ocs_mgmt_common.c.
| int ocs_mgmt_exec | ( | ocs_t * | ocs, |
| char * | action, | ||
| void * | arg_in, | ||
| uint32_t | arg_in_length, | ||
| void * | arg_out, | ||
| uint32_t | arg_out_length | ||
| ) |
perform a management action
This is the top level "do action" handler for the driver. It will:
In passing the request to other entities the request is considered to be handled if the function returns 0.
| ocs | pointer to ocs structure |
| action | the name of the action to be performed |
| arg_in | a pointer to an argument being passed to the action |
| arg_in_length | the length of the argument pointed to by *arg_in |
| arg_out | a pointer to an argument being passed to the action |
| arg_out_length | the length of the argument pointed to by *arg_out |
Definition at line 530 of file ocs_mgmt.c.
| int ocs_mgmt_get | ( | ocs_t * | ocs, |
| char * | name, | ||
| ocs_textbuf_t * | textbuf | ||
| ) |
return the value of a mgmt item
This is the top level "get" handler for the driver. It will:
In passing the request to other entities the request is considered to be answered when a response has been written into textbuf, indicated by textbuf->buffer_written being non-zero.
| ocs | pointer to ocs structure |
| name | the name of the status item to be retrieved |
| textbuf | pointer to an ocs_textbuf which is used to return the results |
Definition at line 337 of file ocs_mgmt.c.
| void ocs_mgmt_get_list | ( | ocs_t * | ocs, |
| ocs_textbuf_t * | textbuf | ||
| ) |
get a list of mgmt items supported by the driver
This is the top level "get list" handler for the driver. It will:
| ocs | pointer to ocs structure |
| textbuf | pointer to an ocs_textbuf which is used to accumulate the results |
Definition at line 274 of file ocs_mgmt.c.
| int ocs_mgmt_set | ( | ocs_t * | ocs, |
| char * | name, | ||
| char * | value | ||
| ) |
set the value of a mgmt item
This is the top level "set" handler for the driver. It will:
In passing the request to other entities the request is considered to be handled if the function returns 0.
| ocs | pointer to ocs structure |
| name | the name of the property to be changed |
| value | the requested new value of the property |
Definition at line 456 of file ocs_mgmt.c.
| 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.
| textbuf | Pointer to the driver dump text buffer. |
| name | Name of the section. |
| index | Index number of this instance of the section. |
Definition at line 61 of file ocs_mgmt_common.c.
| void ocs_mgmt_start_unnumbered_section | ( | ocs_textbuf_t * | textbuf, |
| const char * | name | ||
| ) |
Generate the beginning of an unnumbered section in a management XML document.
| textbuf | Pointer to the driver dump text buffer. |
| name | Name of the section. |
Definition at line 81 of file ocs_mgmt_common.c.