|
libsangoma
1
|
Sangoma Driver and Hardware Configuration, Operation. More...

Go to the source code of this file.
Functions | |
| int | sangoma_port_mgmnt_ioctl (sng_fd_t fd, port_management_struct_t *port_management) |
| int | sangoma_port_cfg_ioctl (sng_fd_t fd, port_cfg_t *port_cfg) |
| sng_fd_t _LIBSNG_CALL | sangoma_open_driver_ctrl (int port_no) |
| Open a Global Driver Control Device. More... | |
| int _LIBSNG_CALL | sangoma_mgmt_cmd (sng_fd_t fd, wan_udp_hdr_t *wan_udp) |
| Execute Sangoma Management Command. More... | |
| int _LIBSNG_CALL | sangoma_driver_port_start (sng_fd_t fd, port_management_struct_t *port_mgmnt, unsigned short port_no) |
| Start a Port, create Sangoma Communication interfaces. More... | |
| int _LIBSNG_CALL | sangoma_driver_port_stop (sng_fd_t fd, port_management_struct_t *port_mgmnt, unsigned short port_no) |
| Start a Port, create Sangoma Communication interfaces. More... | |
| int _LIBSNG_CALL | sangoma_driver_get_hw_info (sng_fd_t fd, port_management_struct_t *port_mgmnt, unsigned short port_no) |
| Retrieve information about a single instance of Sangoma hardware. More... | |
| int _LIBSNG_CALL | sangoma_driver_get_version (sng_fd_t fd, port_management_struct_t *port_mgmnt, unsigned short port_no) |
| Retrieve Driver Version BEFORE any communication interface is configured and sangoma_get_driver_version() can not be called. More... | |
| int _LIBSNG_CALL | sangoma_driver_hw_rescan (sng_fd_t fd, port_management_struct_t *port_mgmnt, int *cnt) |
| Rescan the pci and usb bus for newly added hardware. More... | |
| int _LIBSNG_CALL | sangoma_driver_port_set_config (sng_fd_t fd, port_cfg_t *port_cfg, unsigned short port_no) |
| Set Port's "Volatile" configuration. The configuration will not persist between system restarts. Before calling this function please stop the port by calling sangoma_driver_port_stop(). After calling this function please start the port by calling sangoma_driver_port_start(). More... | |
| int _LIBSNG_CALL | sangoma_driver_port_get_config (sng_fd_t fd, port_cfg_t *port_cfg, unsigned short port_no) |
| Retrieve Port's "Volatile" configuration. More... | |
| int _LIBSNG_CALL | sangoma_write_port_config_on_persistent_storage (hardware_info_t *hardware_info, port_cfg_t *port_cfg, unsigned short port_no) |
Sangoma Driver and Hardware Configuration, Operation.
Author(s): Nenad Corbic, David Rokhvarg
Copyright: (c) 2005-2011 Sangoma Technologies Corporation
THIS SOFTWARE IS PROVIDED BY Sangoma Technologies ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Sangoma Technologies BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
Definition in file libsangoma_config.c.
| int sangoma_port_mgmnt_ioctl | ( | sng_fd_t | fd, |
| port_management_struct_t * | port_management | ||
| ) |
Device PORT Control Functions
Definition at line 42 of file libsangoma_config.c.
References FALSE, SANG_STATUS_INVALID_DEVICE, and WANPIPE_IOCTL_PORT_MGMT.
Referenced by sangoma_driver_get_hw_info(), sangoma_driver_get_version(), sangoma_driver_hw_rescan(), sangoma_driver_port_start(), and sangoma_driver_port_stop().

| sng_fd_t sangoma_open_driver_ctrl | ( | int | port_no | ) |
Open a Global Driver Control Device.
The global control device receives events for all devices configured.
Definition at line 107 of file libsangoma_config.c.
References _snprintf, FNAME_LEN, sangoma_open_dev_by_name(), and WP_PORT_NAME_FORM.

| int sangoma_mgmt_cmd | ( | sng_fd_t | fd, |
| wan_udp_hdr_t * | wan_udp | ||
| ) |
Execute Sangoma Management Command.
Device MANAGEMENT Functions
| fd | device file descriptor |
| wan_udp | management command structure |
Definition at line 122 of file libsangoma_config.c.
References WANPIPE_IOCTL_PIPEMON.
Referenced by sangoma_fe_reg_read(), sangoma_fe_reg_write(), sangoma_get_aft_customer_id(), and sangoma_port_led_ctrl().

| int sangoma_driver_port_start | ( | sng_fd_t | fd, |
| port_management_struct_t * | port_mgmnt, | ||
| unsigned short | port_no | ||
| ) |
Start a Port, create Sangoma Communication interfaces.
Device PORT Control Functions
| [in] | fd | Port Device file descriptor |
| [out] | port_mgmnt | pointer to a port_management_struct_t structure. On return, sangoma_driver_port_start() updates operation_status field of this structure. |
| [in] | port_no | 1-based Port Number. Port numbers correspond to Port Names. For example, a 2-Port card will have ports named WANPIPE1 and WANPIPE2. |
Definition at line 151 of file libsangoma_config.c.
References SANG_STATUS_GENERAL_ERROR, and sangoma_port_mgmnt_ioctl().

| int sangoma_driver_port_stop | ( | sng_fd_t | fd, |
| port_management_struct_t * | port_mgmnt, | ||
| unsigned short | port_no | ||
| ) |
Start a Port, create Sangoma Communication interfaces.
| [in] | fd | Port Device file descriptor |
| [out] | port_mgmnt | pointer to a port_management_struct_t structure. On return, sangoma_driver_port_stop() updates operation_status field of this structure. |
| [in] | port_no | 1-based Port Number. Port numbers correspond to Port Names. For example, a 2-Port card will have ports named WANPIPE1 and WANPIPE2. |
Definition at line 167 of file libsangoma_config.c.
References SANG_STATUS_CAN_NOT_STOP_DEVICE_WHEN_ALREADY_STOPPED, SANG_STATUS_GENERAL_ERROR, SANG_STATUS_SUCCESS, and sangoma_port_mgmnt_ioctl().

| int sangoma_driver_get_hw_info | ( | sng_fd_t | fd, |
| port_management_struct_t * | port_mgmnt, | ||
| unsigned short | port_no | ||
| ) |
Retrieve information about a single instance of Sangoma hardware.
| [in] | fd | Port Device file descriptor |
| [out] | port_mgmnt | pointer to port_management_struct_t structure which will contain hardware_info_t at it's "data" field, when this function returns. |
| [in] | port_no | please see comment of sangoma_driver_port_set_config() |
Definition at line 196 of file libsangoma_config.c.
References SANG_STATUS_GENERAL_ERROR, and sangoma_port_mgmnt_ioctl().

| int sangoma_driver_get_version | ( | sng_fd_t | fd, |
| port_management_struct_t * | port_mgmnt, | ||
| unsigned short | port_no | ||
| ) |
Retrieve Driver Version BEFORE any communication interface is configured and sangoma_get_driver_version() can not be called.
| [in] | fd | Port Device file descriptor |
| [out] | port_mgmnt | pointer to port_management_struct_t structure which will contain wan_driver_version_t at it's "data" field, when this function returns. |
| [in] | port_no | please see comment of sangoma_driver_port_set_config() |
Definition at line 211 of file libsangoma_config.c.
References sangoma_port_mgmnt_ioctl().

| int sangoma_driver_hw_rescan | ( | sng_fd_t | fd, |
| port_management_struct_t * | port_mgmnt, | ||
| int * | detected_port_cnt | ||
| ) |
Rescan the pci and usb bus for newly added hardware.
| [in] | fd | Port Device file descriptor |
| [out] | port_mgmnt | pointer to port_management_struct_t structure which will contain wan_driver_version_t at it's "data" field, when this function returns. |
| [out] | detected_port_cnt | newly detected ports. |
Definition at line 226 of file libsangoma_config.c.
References sangoma_port_mgmnt_ioctl().

| int sangoma_driver_port_set_config | ( | sng_fd_t | fd, |
| port_cfg_t * | port_cfg, | ||
| unsigned short | port_no | ||
| ) |
Set Port's "Volatile" configuration. The configuration will not persist between system restarts. Before calling this function please stop the port by calling sangoma_driver_port_stop(). After calling this function please start the port by calling sangoma_driver_port_start().
| [in] | fd | Port Device file descriptor |
| [in,out] | port_cfg | pointer to port_cfg_t structure that specifies complete Port configuration. On return, sangoma_driver_port_set_config() updates operation_status field of this structure. |
| [in] | port_no | 1-based Port Number. Port numbers correspond to Port Names. For example, a 2-Port card will have ports named WANPIPE1 and WANPIPE2. |
Definition at line 244 of file libsangoma_config.c.
References SANG_STATUS_GENERAL_ERROR.
| int sangoma_driver_port_get_config | ( | sng_fd_t | fd, |
| port_cfg_t * | port_cfg, | ||
| unsigned short | port_no | ||
| ) |
Retrieve Port's "Volatile" configuration.
| [in] | fd | Port Device file descriptor |
| [out] | port_cfg | pointer to port_cfg_t structure. On return, sangoma_driver_port_get_config() will copy current Port configuration into this structure. |
| [in] | port_no | please see comment of sangoma_driver_port_set_config() |
Definition at line 253 of file libsangoma_config.c.
References SANG_STATUS_GENERAL_ERROR.
1.8.5