wanpipe_api_iface.h File Reference

WANPIPE(tm) Driver API Interface -. More...

#include "wanpipe_api_hdr.h"

Include dependency graph for wanpipe_api_iface.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _wp_bert_status
 BERT status and statistics. More...
struct  wanpipe_chan_stats
 TDM API channel statistics. More...
struct  _DRIVER_VERSION
struct  wanpipe_api_dev_cfg
 TDM API Device Configuration Structure. More...
struct  wanpipe_api_cmd
 Wanpipe API Device Command Structure used with WANPIPE_IOCTL_API_CMD. More...
struct  wanpipe_api_callbacks
 Wanpipe API Callback Structure. More...
struct  wanpipe_api
 Wanpipe API Command Structure. More...

Defines

#define WP_API_FEATURE_DTMF_EVENTS   1
 Indicates to developer that dtmf feature is available.
#define WP_API_FEATURE_FE_ALARM   1
 Indicates to developer that fe alarm feature is available.
#define WP_API_FEATURE_EVENTS   1
 Indicates to developer that events feature is available.
#define WP_API_FEATURE_LINK_STATUS   1
 Indicates to developer that link status feature is available.
#define WP_API_FEATURE_POL_REV   1
 Indicates to developer that polarity reversal feature is available.
#define WP_API_FEATURE_LOGGER   1
 Indicates to developer that Wanpipe Logger API feature is available.
#define WP_API_FEATURE_FAX_EVENTS   1
#define WP_API_FEATURE_RM_GAIN   1
 Indicates to developer that analog hardware gain feature is available.
#define WP_API_FEATURE_LOOP   1
 Indicates to developer that loop feature is available.
#define WP_API_FEATURE_BUFFER_MULT   1
 Indicates to developer that buffer multiplier featere is available.
#define WP_API_FEATURE_RX_TX_ERRS   1
 Indicates to developer that rx tx error reporting feature is available.
#define WP_API_FEATURE_EC_CHAN_STAT   1
 Indicates to developer that echo channel status feature is available.
#define WP_API_FEATURE_LIBSNG_HWEC   1
#define WP_API_FEATURE_DRIVER_GAIN   1
#define WP_API_FEATURE_FE_RW   1
#define WP_API_FEATURE_HWEC_PERSIST   1
#define WP_API_FEATURE_FAX_TYPE_EVENTS   1
#define WP_API_FEATURE_HARDWARE_RESCAN   1
#define WP_API_FEATURE_LED_CTRL   1
#define WP_BERT_DECODE_SEQUENCE_TYPE(sequence)
#define WP_BERT_STATUS_OUT_OF_SYNCH   0
#define WP_BERT_STATUS_IN_SYNCH   1
#define WP_API_EVENT_SET   0x01
 Option to write a particular command.
#define WP_API_EVENT_GET   0x02
 Option to read a particular command.
#define WP_API_EVENT_ENABLE   0x01
 Option to enable command.
#define WP_API_EVENT_DISABLE   0x02
 Option to disable command.
#define WP_API_EVENT_MODE_DECODE(mode)
 Decode disable/enable command.
#define WPTDM_A_BIT   WAN_RBS_SIG_A
 RBS BIT A.
#define WPTDM_B_BIT   WAN_RBS_SIG_B
 RBS BIT B.
#define WPTDM_C_BIT   WAN_RBS_SIG_C
 RBS BIT C.
#define WPTDM_D_BIT   WAN_RBS_SIG_D
#define WP_API_EVENT_RXHOOK_OFF   0x01
 Rx Off Hook indication value.
#define WP_API_EVENT_RXHOOK_ON   0x02
 Rx ON Hook indication value.
#define WP_API_EVENT_RXHOOK_FLASH   0x03
 Rx WINK FLASH indication value.
#define WP_API_EVENT_RXHOOK_DECODE(state)
 Print out the hook state.
#define WP_API_EVENT_RING_PRESENT   0x01
 Ring Present Value.
#define WP_API_EVENT_RING_STOP   0x02
 Ring Stop Value.
#define WP_API_EVENT_RING_DECODE(state)
 Print out the Ring state.
#define WP_API_EVENT_RING_TRIP_PRESENT   0x01
 Ring Trip Present Value.
#define WP_API_EVENT_RING_TRIP_STOP   0x02
 Ring Trip Stop Value.
#define WP_API_EVENT_RING_TRIP_DECODE(state)
 Print out the Ring Trip state.
#define WP_API_EVENT_LINK_STATUS_CONNECTED   0x01
 Link Connected state value.
#define WP_API_EVENT_LINK_STATUS_DISCONNECTED   0x02
 Link Disconnected state value.
#define WP_API_EVENT_LINK_STATUS_DECODE(status)
 Print out the Link state.
#define WP_API_EVENT_POL_REV_POS_TO_NEG   0x01
 Polarity Reversal Postive to Negative.
#define WP_API_EVENT_POL_REV_NEG_TO_POS   0x02
 Polarity Reversal Negative to Positive.
#define WP_API_EVENT__POL_REV_NEG_TO_POS   WP_API_EVENT_POL_REV_NEG_TO_POS
#define WP_API_EVENT_POLARITY_REVERSE_DECODE(polarity_reverse)
 Print out the Polarity state.
#define WP_API_EVENT_TONE_DIAL   0x01
 Dial tone value.
#define WP_API_EVENT_TONE_BUSY   0x02
 Busy tone value.
#define WP_API_EVENT_TONE_RING   0x03
 Ring tone value.
#define WP_API_EVENT_TONE_CONGESTION   0x04
 Contestion tone value.
#define WP_API_EVENT_TONE_DTMF   0x05
 Define tone indicates TONE type DTMF.
#define WP_API_EVENT_TONE_FAXCALLING   0x06
 Define tone indicates TONE type FAXCALLING.
#define WP_API_EVENT_TONE_FAXCALLED   0x07
 Define tone indicates TONE type FAXCALLED.
#define WAN_BRI_BCHAN1   0x01
 BRI Channel 1.
#define WAN_BRI_BCHAN2   0x02
 BRI Channel 2.
#define WAN_BRI_DCHAN   0x03
 BRI Dchan Channel.
#define WP_PORT_NAME_FORM   "wanpipe%d"
 String define of a wanpipe port name.
#define WP_INTERFACE_NAME_FORM   "wanpipe%d_if%d"
 String define of a wanpipe interface name.
#define WP_CTRL_DEV_NAME   "wanpipe_ctrl"
#define WP_CONFIG_DEV_NAME   "wanpipe"
#define WP_TIMER_DEV_NAME_FORM   "wanpipe_timer%d"
#define WP_LOGGER_DEV_NAME   "wanpipe_logger"
#define WP_AFT_CHAN_ERROR_STATS(chan_stats, var)   chan_stats.var++;chan_stats.errors++
#define WP_AFT_RX_ERROR_SUM(chan_stats)
#define WP_AFT_TX_ERROR_SUM(chan_stats)
#define WANPIPE_API_CMD_SZ   512
#define WANPIPE_API_DEV_CFG_MAX_SZ   337
#define WANPIPE_API_CMD_SZ_UNION   WANPIPE_API_CMD_SZ - (sizeof(unsigned int)*3) - (sizeof(unsigned char)*2)
#define WANPIPE_API_CMD_RESERVED_SZ   128 - sizeof(int)*1 - sizeof(char)*3
#define WANPIPE_API_DEV_CFG_SZ   sizeof(int)*20 + sizeof(char)*4 + WANPIPE_API_CMD_RESERVED_SZ + sizeof(wanpipe_chan_stats_t)
#define WANPIPE_API_CMD_INIT_SPAN(wp_cmd_ptr, span_no)   ((wp_cmd_ptr)->span = (unsigned char)span_no)
#define WANPIPE_API_CMD_INIT_CHAN(wp_cmd_ptr, chan_no)   ((wp_cmd_ptr)->chan = (unsigned char)chan_no)
#define WANPIPE_API_INIT_SPAN(wanpipe_api_ptr, span_no)   WANPIPE_API_CMD_INIT_SPAN(&wanpipe_api_ptr->wp_cmd, span_no)
#define WANPIPE_API_INIT_CHAN(wanpipe_api_ptr, chan_no)   WANPIPE_API_CMD_INIT_CHAN(&wanpipe_api_ptr->wp_cmd, chan_no)

Typedefs

typedef int sng_fd_t
 Windows/Unix file handle abstraction.
typedef enum wp_bert_sequence_type wp_bert_sequence_type_t
typedef struct _wp_bert_status wp_bert_status_t
typedef struct wanpipe_chan_stats wanpipe_chan_stats_t
typedef struct _DRIVER_VERSION wan_driver_version_t
typedef struct _DRIVER_VERSION DRIVER_VERSION
typedef struct _DRIVER_VERSION * PDRIVER_VERSION
typedef struct wanpipe_api_dev_cfg wanpipe_api_dev_cfg_t
typedef struct wanpipe_api_cmd wanpipe_api_cmd_t
typedef struct
wanpipe_api_callbacks 
wanpipe_api_callbacks_t
typedef struct wanpipe_api wanpipe_api_t

Enumerations

enum  WANPIPE_IOCTL_CODE {
  WANPIPE_IOCTL_WRITE = 1, WANPIPE_IOCTL_READ, WANPIPE_IOCTL_MGMT, WANPIPE_IOCTL_SET_IDLE_TX_BUFFER,
  WANPIPE_IOCTL_API_POLL, WANPIPE_IOCTL_SET_SHARED_EVENT, WANPIPE_IOCTL_PORT_MGMT, WANPIPE_IOCTL_PORT_CONFIG,
  WANPIPE_IOCTL_API_CMD, WANPIPE_IOCTL_PIPEMON, WANPIPE_IOCTL_SNMP, WANPIPE_IOCTL_SNMP_IFSPEED,
  WANPIPE_IOCTL_DEVEL, WANPIPE_IOCTL_WRITE_NON_BLOCKING, WANPIPE_IOCTL_READ_NON_BLOCKING, WANPIPE_IOCTL_CDEV_CTRL,
  WANPIPE_IOCTL_LOGGER_CMD
}
 Wanpipe IOCTL Commands. More...
enum  WANPIPE_IOCTL_PIPEMON_CMDS {
  WANPIPEMON_ROUTER_UP_TIME = 0x50, WANPIPEMON_ENABLE_TRACING, WANPIPEMON_DISABLE_TRACING, WANPIPEMON_GET_TRACE_INFO,
  WANPIPEMON_READ_CODE_VERSION, WANPIPEMON_FLUSH_OPERATIONAL_STATS, WANPIPEMON_OPERATIONAL_STATS, WANPIPEMON_READ_OPERATIONAL_STATS,
  WANPIPEMON_READ_CONFIGURATION, WANPIPEMON_READ_COMMS_ERROR_STATS, WANPIPEMON_FLUSH_COMMS_ERROR_STATS, WANPIPEMON_AFT_LINK_STATUS,
  WANPIPEMON_AFT_MODEM_STATUS, WANPIPEMON_AFT_HWEC_STATUS, WANPIPEMON_DIGITAL_LOOPTEST, WANPIPEMON_SET_FT1_MODE,
  WANPIPEMON_GET_OPEN_HANDLES_COUNTER, WANPIPEMON_GET_CARD_TYPE, WANPIPEMON_API_NOT_USED, WANPIPEMON_GET_HW_MAC_ADDR,
  WANPIPEMON_FLUSH_TX_BUFFERS, WANPIPEMON_EC_IOCTL, WANPIPEMON_SET_RBS_BITS, WANPIPEMON_GET_RBS_BITS,
  WANPIPEMON_AFT_CUSTOMER_ID, WANPIPEMON_FT1_READ_STATUS, WANPIPEMON_DRIVER_STAT_IFSEND, WANPIPEMON_DRIVER_STAT_INTR,
  WANPIPEMON_DRIVER_STAT_GEN, WANPIPEMON_FLUSH_DRIVER_STATS, WANPIPEMON_GET_IBA_DATA, WANPIPEMON_TDM_API,
  WANPIPEMON_READ_PERFORMANCE_STATS, WANPIPEMON_FLUSH_PERFORMANCE_STATS, WANPIPEMON_GET_BIOS_ENCLOSURE3_SERIAL_NUMBER, WANPIPEMON_ENABLE_BERT,
  WANPIPEMON_DISABLE_BERT, WANPIPEMON_GET_BERT_STATUS, WANPIPEMON_PERFORMANCE_STATS, WANPIPEMON_LED_CTRL,
  WANPIPEMON_CHAN_SEQ_DEBUGGING, WANPIPEMON_GEN_FIFO_ERR_TX, WANPIPEMON_GEN_FIFO_ERR_RX, WANPIPEMON_GEN_FE_SYNC_ERR,
  WANPIPEMON_PROTOCOL_PRIVATE
}
 Commands used with WANPIPE_IOCTL_PIPEMON IOCTL. More...
enum  wp_bert_sequence_type { WP_BERT_RANDOM_SEQUENCE = 1, WP_BERT_ASCENDANT_SEQUENCE, WP_BERT_DESCENDANT_SEQUENCE }
enum  wanpipe_api_cmds {
  WP_API_CMD_GET_USR_MTU_MRU, WP_API_CMD_SET_USR_PERIOD, WP_API_CMD_GET_USR_PERIOD, WP_API_CMD_SET_HW_MTU_MRU,
  WP_API_CMD_GET_HW_MTU_MRU, WP_API_CMD_SET_CODEC, WP_API_CMD_GET_CODEC, WP_API_CMD_SET_POWER_LEVEL,
  WP_API_CMD_GET_POWER_LEVEL, WP_API_CMD_TOGGLE_RX, WP_API_CMD_TOGGLE_TX, WP_API_CMD_GET_HW_CODING,
  WP_API_CMD_SET_HW_CODING, WP_API_CMD_GET_FULL_CFG, WP_API_CMD_SET_EC_TAP, WP_API_CMD_GET_EC_TAP,
  WP_API_CMD_ENABLE_RBS_EVENTS, WP_API_CMD_DISABLE_RBS_EVENTS, WP_API_CMD_WRITE_RBS_BITS, WP_API_CMD_READ_RBS_BITS,
  WP_API_CMD_GET_STATS, WP_API_CMD_FLUSH_BUFFERS, WP_API_CMD_FLUSH_TX_BUFFERS, WP_API_CMD_FLUSH_RX_BUFFERS,
  WP_API_CMD_FLUSH_EVENT_BUFFERS, WP_API_CMD_READ_EVENT, WP_API_CMD_SET_EVENT, WP_API_CMD_SET_RX_GAINS,
  WP_API_CMD_SET_TX_GAINS, WP_API_CMD_CLEAR_RX_GAINS, WP_API_CMD_CLEAR_TX_GAINS, WP_API_CMD_GET_FE_ALARMS,
  WP_API_CMD_ENABLE_HWEC, WP_API_CMD_DISABLE_HWEC, WP_API_CMD_SET_FE_STATUS, WP_API_CMD_GET_FE_STATUS,
  WP_API_CMD_GET_HW_DTMF, WP_API_CMD_DRV_MGMNT, WP_API_CMD_RESET_STATS, WP_API_CMD_DRIVER_VERSION,
  WP_API_CMD_FIRMWARE_VERSION, WP_API_CMD_CPLD_VERSION, WP_API_CMD_OPEN_CNT, WP_API_CMD_SET_TX_Q_SIZE,
  WP_API_CMD_GET_TX_Q_SIZE, WP_API_CMD_SET_RX_Q_SIZE, WP_API_CMD_GET_RX_Q_SIZE, WP_API_CMD_EVENT_CTRL,
  WP_API_CMD_NOTSUPP, WP_API_CMD_SET_RM_RXFLASHTIME, WP_API_CMD_SET_IDLE_FLAG, WP_API_CMD_GET_HW_EC,
  WP_API_CMD_GET_HW_FAX_DETECT, WP_API_CMD_ENABLE_LOOP, WP_API_CMD_DISABLE_LOOP, WP_API_CMD_BUFFER_MULTIPLIER,
  WP_API_CMD_GET_HW_EC_CHAN, WP_API_CMD_GET_HW_EC_PERSIST, WP_API_CMD_EC_IOCTL, WP_API_CMD_GEN_FIFO_ERR_TX = 500,
  WP_API_CMD_GEN_FIFO_ERR_RX, WP_API_CMD_START_CHAN_SEQ_DEBUG, WP_API_CMD_STOP_CHAN_SEQ_DEBUG
}
 Commands used with WANPIPE_IOCTL_API_CMD IOCTL. More...
enum  wanpipe_cdev_ctrl_cmds {
  WP_CDEV_CMD_SET_DPC_TIMEDIFF_MONITORING_OPTION = 1, WP_CDEV_CMD_SET_TX_INTERRUPT_TIMEDIFF_MONITORING_OPTION, WP_CDEV_CMD_SET_RX_INTERRUPT_TIMEDIFF_MONITORING_OPTION, WP_CDEV_CMD_PRINT_INTERRUPT_TIMEDIFF_MONITORING_INFO,
  WP_CDEV_CMD_GET_INTERFACE_NAME
}
 Commands used with WANPIPE_IOCTL_CDEV_CTRL IOCTL.
enum  wanpipe_api_events {
  WP_API_EVENT_NONE, WP_API_EVENT_RBS, WP_API_EVENT_ALARM, WP_API_EVENT_DTMF,
  WP_API_EVENT_RM_DTMF, WP_API_EVENT_RXHOOK, WP_API_EVENT_RING, WP_API_EVENT_RING_DETECT,
  WP_API_EVENT_RING_TRIP_DETECT, WP_API_EVENT_TONE, WP_API_EVENT_TXSIG_KEWL, WP_API_EVENT_TXSIG_START,
  WP_API_EVENT_TXSIG_OFFHOOK, WP_API_EVENT_TXSIG_ONHOOK, WP_API_EVENT_ONHOOKTRANSFER, WP_API_EVENT_SETPOLARITY,
  WP_API_EVENT_BRI_CHAN_LOOPBACK, WP_API_EVENT_LINK_STATUS, WP_API_EVENT_MODEM_STATUS, WP_API_EVENT_POLARITY_REVERSE,
  WP_API_EVENT_FAX_DETECT, WP_API_EVENT_SET_RM_TX_GAIN, WP_API_EVENT_SET_RM_RX_GAIN, WP_API_EVENT_FAX_1100,
  WP_API_EVENT_FAX_2100, WP_API_EVENT_FAX_2100_WSPR
}
 Events available on wanpipe api device. More...


Detailed Description

WANPIPE(tm) Driver API Interface -.

Provides IO/Event API Only Authors: Nenad Corbic <ncorbic@sangoma.com> David Rokhvarg <davidr@sangoma.com>

Copyright (c) 2007 - 08, Sangoma Technologies All rights reserved.

* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Sangoma Technologies nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

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 wanpipe_api_iface.h.


Define Documentation

#define WP_BERT_DECODE_SEQUENCE_TYPE ( sequence   ) 

Value:

((sequence) == WP_BERT_RANDOM_SEQUENCE) ? "WP_BERT_RANDOM_SEQUENCE" :           \
    ((sequence) == WP_BERT_ASCENDANT_SEQUENCE) ? "WP_BERT_ASCENDANT_SEQUENCE" :     \
    ((sequence) == WP_BERT_DESCENDANT_SEQUENCE) ? "WP_BERT_DESCENDANT_SEQUENCE" :   \
        "(Unknown BERT sequence)"

Definition at line 193 of file wanpipe_api_iface.h.

#define WP_API_EVENT_MODE_DECODE ( mode   ) 

Value:

((mode) == WP_API_EVENT_ENABLE) ? "Enable" :        \
        ((mode) == WP_API_EVENT_DISABLE) ? "Disable" :      \
                        "(Unknown mode)"
Decode disable/enable command.

Definition at line 365 of file wanpipe_api_iface.h.

#define WP_API_EVENT_RXHOOK_DECODE ( state   ) 

Value:

((state) == WP_API_EVENT_RXHOOK_OFF) ? "Off-hook" : \
        ((state) == WP_API_EVENT_RXHOOK_FLASH) ? "Flash" :  \
        ((state) == WP_API_EVENT_RXHOOK_ON) ? "On-hook" :   \
                        "(Unknown state)"
Print out the hook state.

Definition at line 400 of file wanpipe_api_iface.h.

#define WP_API_EVENT_RING_DECODE ( state   ) 

Value:

((state) == WP_API_EVENT_RING_PRESENT) ? "Ring Present" :   \
        ((state) == WP_API_EVENT_RING_STOP) ? "Ring Stop" : \
                        "(Unknown state)"
Print out the Ring state.

Definition at line 415 of file wanpipe_api_iface.h.

#define WP_API_EVENT_RING_TRIP_DECODE ( state   ) 

Value:

((state) == WP_API_EVENT_RING_TRIP_PRESENT) ? "Ring Present" :  \
        ((state) == WP_API_EVENT_RING_TRIP_STOP) ? "Ring Stop" :    \
                        "(Unknown state)"
Print out the Ring Trip state.

Definition at line 430 of file wanpipe_api_iface.h.

#define WP_API_EVENT_LINK_STATUS_DECODE ( status   ) 

Value:

((status) == WP_API_EVENT_LINK_STATUS_CONNECTED) ? "Connected" :        \
        ((status) == WP_API_EVENT_LINK_STATUS_DISCONNECTED)  ? "Disconnected" :     \
                            "Unknown"
Print out the Link state.

Definition at line 445 of file wanpipe_api_iface.h.

#define WP_API_EVENT_POLARITY_REVERSE_DECODE ( polarity_reverse   ) 

Value:

((polarity_reverse) == WP_API_EVENT_POL_REV_POS_TO_NEG) ? "+ve to -ve" :        \
        ((polarity_reverse) == WP_API_EVENT_POL_REV_NEG_TO_POS)  ? "-ve to +ve" :       \
                            "Unknown"
Print out the Polarity state.

Definition at line 462 of file wanpipe_api_iface.h.

#define WP_AFT_RX_ERROR_SUM ( chan_stats   ) 

Value:

chan_stats.rx_errors+ \
                                        chan_stats.rx_dropped+ \
                                        chan_stats.rx_length_errors + \
                                        chan_stats.rx_crc_errors + \
                                        chan_stats.rx_frame_errors + \
                                        chan_stats.rx_fifo_errors + \
                                        chan_stats.rx_missed_errors + \
                                        chan_stats.rx_hdlc_abort_counter

Definition at line 596 of file wanpipe_api_iface.h.

#define WP_AFT_TX_ERROR_SUM ( chan_stats   ) 

Value:

chan_stats.tx_errors+ \
                                        chan_stats.tx_dropped + \
                                        chan_stats.tx_aborted_errors + \
                                        chan_stats.tx_carrier_errors + \
                                        chan_stats.tx_fifo_errors+ \
                                        chan_stats.tx_heartbeat_errors + \
                                        chan_stats.tx_window_errors

Definition at line 605 of file wanpipe_api_iface.h.


Enumeration Type Documentation

Wanpipe IOCTL Commands.

Wanpipe System/IOCTL Commands for API Devices The system calls perform, configration/management/operation/io

Enumerator:
WANPIPE_IOCTL_WRITE  Write cmd, Windows Only
WANPIPE_IOCTL_READ  Read cmd, Windows Only
WANPIPE_IOCTL_MGMT  Mgmnt cmd, driver/port configuration/debugging
WANPIPE_IOCTL_SET_IDLE_TX_BUFFER  Set idle buffer on a device
WANPIPE_IOCTL_API_POLL  Poll cmd, Windows Only
WANPIPE_IOCTL_SET_SHARED_EVENT  Shared Event cmd, Windows Only
WANPIPE_IOCTL_PORT_MGMT  Port Mgmnt Event cmd
WANPIPE_IOCTL_PORT_CONFIG  Port Config Event
WANPIPE_IOCTL_API_CMD  Wanpipe API command
WANPIPE_IOCTL_PIPEMON  PIPEMON command, debugging
WANPIPE_IOCTL_SNMP  SNMP statistics, not implemented
WANPIPE_IOCTL_SNMP_IFSPEED  SNMP statistics, not implemented
WANPIPE_IOCTL_DEVEL  Development Cmds, use only for hw debugging
WANPIPE_IOCTL_WRITE_NON_BLOCKING  Non-Blocking Write cmd, Windows Only
WANPIPE_IOCTL_READ_NON_BLOCKING  Non-Blocking Read cmd, Windows Only
WANPIPE_IOCTL_CDEV_CTRL  Non-Blocking Cdev control cmd, Windows Only
WANPIPE_IOCTL_LOGGER_CMD  Wanpipe Logger command

Definition at line 104 of file wanpipe_api_iface.h.

Commands used with WANPIPE_IOCTL_PIPEMON IOCTL.

Enumerator:
WANPIPEMON_ROUTER_UP_TIME  Check router up time
WANPIPEMON_ENABLE_TRACING  Enable data tracing
WANPIPEMON_DISABLE_TRACING  Disable data tracing
WANPIPEMON_GET_TRACE_INFO  Get traced data frame
WANPIPEMON_READ_CODE_VERSION  Get HW Firmware Version
WANPIPEMON_FLUSH_OPERATIONAL_STATS  Flush operational stats
WANPIPEMON_OPERATIONAL_STATS  Get operational stats
WANPIPEMON_READ_OPERATIONAL_STATS  Get operational stats
WANPIPEMON_READ_CONFIGURATION  Get device configuration
WANPIPEMON_READ_COMMS_ERROR_STATS  Read comm statistics
WANPIPEMON_FLUSH_COMMS_ERROR_STATS  Flush comm statistics
WANPIPEMON_AFT_LINK_STATUS  Get Device Link Status
WANPIPEMON_AFT_MODEM_STATUS  Get Device Mode Status (Serial Cards Only)
WANPIPEMON_AFT_HWEC_STATUS  Get Device HWEC Status (Supported or Not)
WANPIPEMON_DIGITAL_LOOPTEST  Perform a digial loop data integrity test
WANPIPEMON_SET_FT1_MODE  Set T1 Mode - Legacy Deprecated
WANPIPEMON_GET_OPEN_HANDLES_COUNTER  Get number of open handles on this device
WANPIPEMON_GET_CARD_TYPE  Get card type A101/2/4/8/A200
WANPIPEMON_API_NOT_USED  Not Used
WANPIPEMON_GET_HW_MAC_ADDR  Get HWE MAC Address (Used by S518 Adsl)
WANPIPEMON_FLUSH_TX_BUFFERS  Flush Tx Buffers
WANPIPEMON_EC_IOCTL  HWEC Commands
WANPIPEMON_SET_RBS_BITS  Set RBS Bits
WANPIPEMON_GET_RBS_BITS  Read RBS Bits
WANPIPEMON_AFT_CUSTOMER_ID  Get Unique Custome ID
WANPIPEMON_FT1_READ_STATUS  Read T1/E1 Status
WANPIPEMON_DRIVER_STAT_IFSEND  Driver statistics ifsend()
WANPIPEMON_DRIVER_STAT_INTR  Driver statistics interrupts
WANPIPEMON_DRIVER_STAT_GEN  Driver statistics general
WANPIPEMON_FLUSH_DRIVER_STATS  Flush driver statistics
WANPIPEMON_GET_IBA_DATA  Get IBA Data - Deprecated not used
WANPIPEMON_TDM_API  Windows Legacy- TDM API commands
WANPIPEMON_GET_BIOS_ENCLOSURE3_SERIAL_NUMBER  Get Enclosure3 Serial Number from Motherboard BIOS.
WANPIPEMON_ENABLE_BERT  Start BERT for the interface.
WANPIPEMON_DISABLE_BERT  Stop BERT for the interface.
WANPIPEMON_GET_BERT_STATUS  Get BERT status/statistics (Locked/Not Locked)
WANPIPEMON_PERFORMANCE_STATS  Control performance performance statistics
WANPIPEMON_LED_CTRL  Control led on a port - on/off
WANPIPEMON_CHAN_SEQ_DEBUGGING  Debugging only - enable/disable span level sequence debugging
WANPIPEMON_GEN_FIFO_ERR_TX  Debugging only - generate tx fifo error
WANPIPEMON_GEN_FIFO_ERR_RX  Debugging only - generate rx fifo error
WANPIPEMON_GEN_FE_SYNC_ERR  Debugging only - generate fe sync error
WANPIPEMON_PROTOCOL_PRIVATE  Private Wanpipemon commands used by lower layers

Definition at line 129 of file wanpipe_api_iface.h.

00129                                 {
00130     WANPIPEMON_ROUTER_UP_TIME = 0x50,       
00131     WANPIPEMON_ENABLE_TRACING,              
00132     WANPIPEMON_DISABLE_TRACING,             
00133     WANPIPEMON_GET_TRACE_INFO,              
00134     WANPIPEMON_READ_CODE_VERSION,           
00135     WANPIPEMON_FLUSH_OPERATIONAL_STATS,     
00136     WANPIPEMON_OPERATIONAL_STATS,           
00137     WANPIPEMON_READ_OPERATIONAL_STATS,      
00138     WANPIPEMON_READ_CONFIGURATION,          
00139     WANPIPEMON_READ_COMMS_ERROR_STATS,      
00140     WANPIPEMON_FLUSH_COMMS_ERROR_STATS,     
00141     WANPIPEMON_AFT_LINK_STATUS,             
00142     WANPIPEMON_AFT_MODEM_STATUS,            
00143     WANPIPEMON_AFT_HWEC_STATUS,             
00144     WANPIPEMON_DIGITAL_LOOPTEST,            
00145     WANPIPEMON_SET_FT1_MODE,                
00147     WANPIPEMON_GET_OPEN_HANDLES_COUNTER,    
00148     WANPIPEMON_GET_CARD_TYPE,               
00149     WANPIPEMON_API_NOT_USED,                
00150     WANPIPEMON_GET_HW_MAC_ADDR,             
00151     WANPIPEMON_FLUSH_TX_BUFFERS,            
00152     WANPIPEMON_EC_IOCTL,                
00153     WANPIPEMON_SET_RBS_BITS,            
00154     WANPIPEMON_GET_RBS_BITS,            
00155     WANPIPEMON_AFT_CUSTOMER_ID,             
00156     WANPIPEMON_FT1_READ_STATUS,             
00158     WANPIPEMON_DRIVER_STAT_IFSEND,          
00159     WANPIPEMON_DRIVER_STAT_INTR,            
00160     WANPIPEMON_DRIVER_STAT_GEN,             
00161     WANPIPEMON_FLUSH_DRIVER_STATS,          
00162     WANPIPEMON_GET_IBA_DATA,                
00163     WANPIPEMON_TDM_API,                     
00165     WANPIPEMON_READ_PERFORMANCE_STATS,
00166     WANPIPEMON_FLUSH_PERFORMANCE_STATS,
00167     WANPIPEMON_GET_BIOS_ENCLOSURE3_SERIAL_NUMBER,   
00169     WANPIPEMON_ENABLE_BERT,             
00170     WANPIPEMON_DISABLE_BERT,            
00171     WANPIPEMON_GET_BERT_STATUS,         
00172     WANPIPEMON_PERFORMANCE_STATS,       
00173     WANPIPEMON_LED_CTRL,                
00175     /* Do not add any non-debugging commands below */
00176     WANPIPEMON_CHAN_SEQ_DEBUGGING,          
00177     WANPIPEMON_GEN_FIFO_ERR_TX,             
00178     WANPIPEMON_GEN_FIFO_ERR_RX,             
00179     WANPIPEMON_GEN_FE_SYNC_ERR,             
00181     /* All Public commands must be between WANPIPEMON_ROUTER_UP_TIME and WANPIPEMON_PROTOCOL_PRIVATE. */
00182 
00183     WANPIPEMON_PROTOCOL_PRIVATE     
00184 };

Commands used with WANPIPE_IOCTL_API_CMD IOCTL.

Enumerator:
WP_API_CMD_GET_USR_MTU_MRU  Get Device tx/rx (CHUNK) in bytes, multiple of 8
WP_API_CMD_SET_USR_PERIOD  Set chunk period in miliseconds eg: 1ms = 8bytes
WP_API_CMD_GET_USR_PERIOD  Get configured chunk period in miliseconds eg: 1ms = 8bytes
WP_API_CMD_SET_HW_MTU_MRU  Set hw tx/rx chunk in bytes eg: 1ms = 8bytes
WP_API_CMD_GET_HW_MTU_MRU  Get hw tx/rx chunk in bytes eg: 1ms = 8bytes
WP_API_CMD_SET_CODEC  Set device codec (ulaw/alaw/slinear)
WP_API_CMD_GET_CODEC  Get configured device codec (ulaw/alaw/slinear)
WP_API_CMD_SET_POWER_LEVEL  Not implemented
WP_API_CMD_GET_POWER_LEVEL  Not implemented
WP_API_CMD_TOGGLE_RX  Disable/Enable RX on this device
WP_API_CMD_TOGGLE_TX  Disable/Enable TX on this device
WP_API_CMD_GET_HW_CODING  Get HW coding configuration (ulaw or alaw)
WP_API_CMD_SET_HW_CODING  Set HW coding (ulaw or alaw)
WP_API_CMD_GET_FULL_CFG  Get full device configuration
WP_API_CMD_SET_EC_TAP  Not implemented
WP_API_CMD_GET_EC_TAP  Not implemented
WP_API_CMD_ENABLE_RBS_EVENTS  Enable RBS Event monitoring
WP_API_CMD_DISABLE_RBS_EVENTS  Disable RBS Event monitoring
WP_API_CMD_WRITE_RBS_BITS  Write RBS bits (ABCD)
WP_API_CMD_READ_RBS_BITS  Read RBS bits (ABCD)
WP_API_CMD_GET_STATS  Get device statistics
WP_API_CMD_FLUSH_BUFFERS  Flush Buffers
WP_API_CMD_FLUSH_TX_BUFFERS  Flush Tx Buffers
WP_API_CMD_FLUSH_RX_BUFFERS  Flush Rx Buffers
WP_API_CMD_FLUSH_EVENT_BUFFERS  Flush Event Buffers
WP_API_CMD_READ_EVENT 
WP_API_CMD_SET_EVENT 
WP_API_CMD_SET_RX_GAINS 
WP_API_CMD_SET_TX_GAINS 
WP_API_CMD_CLEAR_RX_GAINS 
WP_API_CMD_CLEAR_TX_GAINS 
WP_API_CMD_GET_FE_ALARMS 
WP_API_CMD_ENABLE_HWEC 
WP_API_CMD_DISABLE_HWEC 
WP_API_CMD_SET_FE_STATUS 
WP_API_CMD_GET_FE_STATUS 
WP_API_CMD_GET_HW_DTMF  Get Status of the HW DTMF. Enabled(1) or Disabled(0)
WP_API_CMD_DRV_MGMNT 
WP_API_CMD_RESET_STATS  Reset device statistics
WP_API_CMD_DRIVER_VERSION  Driver Version
WP_API_CMD_FIRMWARE_VERSION  Firmware Version
WP_API_CMD_CPLD_VERSION  CPLD Version
WP_API_CMD_OPEN_CNT  Open Cnt
WP_API_CMD_SET_TX_Q_SIZE  Set TX Queue Size
WP_API_CMD_GET_TX_Q_SIZE  Get TX Queue Size
WP_API_CMD_SET_RX_Q_SIZE  Set RX Queue Size
WP_API_CMD_GET_RX_Q_SIZE  Get RX Queue Size
WP_API_CMD_EVENT_CTRL 
WP_API_CMD_NOTSUPP 
WP_API_CMD_SET_RM_RXFLASHTIME  Set rxflashtime for FXS
WP_API_CMD_SET_IDLE_FLAG  Set Idle Flag (char) for a BitStream (Voice) channel
WP_API_CMD_GET_HW_EC  Check Status of HW Echo Cancelation. Enabled(1) or Disabled(0)
WP_API_CMD_GET_HW_FAX_DETECT  Check Status of HW Fax Detect. Enabled(1) or Disabled(0)
WP_API_CMD_ENABLE_LOOP  Remote Loop the channel
WP_API_CMD_DISABLE_LOOP  Disable remote loop
WP_API_CMD_BUFFER_MULTIPLIER  Set Buffer Multiplier - for SPAN voice mode only
WP_API_CMD_GET_HW_EC_CHAN  Get status of hwec for the current timeslot
WP_API_CMD_GET_HW_EC_PERSIST  Check if hwec persist mode is on or off
WP_API_CMD_EC_IOCTL  Execute command in HWEC module of the Driver

Definition at line 221 of file wanpipe_api_iface.h.

00222 {
00223 
00224     WP_API_CMD_GET_USR_MTU_MRU,     
00225     WP_API_CMD_SET_USR_PERIOD,      
00226     WP_API_CMD_GET_USR_PERIOD,      
00227     WP_API_CMD_SET_HW_MTU_MRU,      
00228     WP_API_CMD_GET_HW_MTU_MRU,      
00229     WP_API_CMD_SET_CODEC,           
00230     WP_API_CMD_GET_CODEC,           
00231     WP_API_CMD_SET_POWER_LEVEL,     
00232     WP_API_CMD_GET_POWER_LEVEL,     
00233     WP_API_CMD_TOGGLE_RX,           
00234     WP_API_CMD_TOGGLE_TX,           
00235     WP_API_CMD_GET_HW_CODING,       
00236     WP_API_CMD_SET_HW_CODING,       
00237     WP_API_CMD_GET_FULL_CFG,        
00238     WP_API_CMD_SET_EC_TAP,          
00239     WP_API_CMD_GET_EC_TAP,          
00240     WP_API_CMD_ENABLE_RBS_EVENTS,   
00241     WP_API_CMD_DISABLE_RBS_EVENTS,  
00242     WP_API_CMD_WRITE_RBS_BITS,      
00243     WP_API_CMD_READ_RBS_BITS,       
00244     WP_API_CMD_GET_STATS,           
00245     WP_API_CMD_FLUSH_BUFFERS,       
00246     WP_API_CMD_FLUSH_TX_BUFFERS,    
00247     WP_API_CMD_FLUSH_RX_BUFFERS,    
00248     WP_API_CMD_FLUSH_EVENT_BUFFERS, 
00249     WP_API_CMD_READ_EVENT,          
00250     WP_API_CMD_SET_EVENT,           
00251     WP_API_CMD_SET_RX_GAINS,        
00252     WP_API_CMD_SET_TX_GAINS,        
00253     WP_API_CMD_CLEAR_RX_GAINS,      
00254     WP_API_CMD_CLEAR_TX_GAINS,      
00255     WP_API_CMD_GET_FE_ALARMS,       
00256     WP_API_CMD_ENABLE_HWEC,         
00257     WP_API_CMD_DISABLE_HWEC,        
00258     WP_API_CMD_SET_FE_STATUS,       
00259     WP_API_CMD_GET_FE_STATUS,       
00260     WP_API_CMD_GET_HW_DTMF,         
00261     WP_API_CMD_DRV_MGMNT,           
00262     WP_API_CMD_RESET_STATS,         
00263     WP_API_CMD_DRIVER_VERSION,      
00264     WP_API_CMD_FIRMWARE_VERSION,    
00265     WP_API_CMD_CPLD_VERSION,        
00266     WP_API_CMD_OPEN_CNT,            
00267     WP_API_CMD_SET_TX_Q_SIZE,       
00268     WP_API_CMD_GET_TX_Q_SIZE,       
00269     WP_API_CMD_SET_RX_Q_SIZE,       
00270     WP_API_CMD_GET_RX_Q_SIZE,       
00271     WP_API_CMD_EVENT_CTRL,          
00272     WP_API_CMD_NOTSUPP,             
00273     WP_API_CMD_SET_RM_RXFLASHTIME,  
00274     WP_API_CMD_SET_IDLE_FLAG,       
00275     WP_API_CMD_GET_HW_EC,           
00276     WP_API_CMD_GET_HW_FAX_DETECT,   
00277     WP_API_CMD_ENABLE_LOOP,         
00278     WP_API_CMD_DISABLE_LOOP,        
00279     WP_API_CMD_BUFFER_MULTIPLIER,   
00280     WP_API_CMD_GET_HW_EC_CHAN,      
00281     WP_API_CMD_GET_HW_EC_PERSIST,   
00282     WP_API_CMD_EC_IOCTL,            
00284     /* Add only debugging commands here */
00285     WP_API_CMD_GEN_FIFO_ERR_TX=500,
00286     WP_API_CMD_GEN_FIFO_ERR_RX,
00287     WP_API_CMD_START_CHAN_SEQ_DEBUG,
00288     WP_API_CMD_STOP_CHAN_SEQ_DEBUG
00289 };

Events available on wanpipe api device.

The events are can be enabled or disabled by application. Events are passed up to the user application by the driver. If event occours and applicatoin has enabled such event, then event is passed up to the api device. User application will receive a poll() signal idicating that event has occoured.

Enumerator:
WP_API_EVENT_NONE 
WP_API_EVENT_RBS  Tx: Enable Disable RBS Opertaion Mode (T1: RBS E1: CAS)
WP_API_EVENT_ALARM 
WP_API_EVENT_DTMF  Enable Disable HW DTMF Detection
WP_API_EVENT_RM_DTMF 
WP_API_EVENT_RXHOOK 
WP_API_EVENT_RING 
WP_API_EVENT_RING_DETECT 
WP_API_EVENT_RING_TRIP_DETECT 
WP_API_EVENT_TONE 
WP_API_EVENT_TXSIG_KEWL 
WP_API_EVENT_TXSIG_START 
WP_API_EVENT_TXSIG_OFFHOOK 
WP_API_EVENT_TXSIG_ONHOOK 
WP_API_EVENT_ONHOOKTRANSFER 
WP_API_EVENT_SETPOLARITY 
WP_API_EVENT_BRI_CHAN_LOOPBACK 
WP_API_EVENT_LINK_STATUS 
WP_API_EVENT_MODEM_STATUS 
WP_API_EVENT_POLARITY_REVERSE 
WP_API_EVENT_FAX_DETECT  Enable Disable HW Fax Detection
WP_API_EVENT_SET_RM_TX_GAIN  Set Tx Gain for FXO/FXS
WP_API_EVENT_SET_RM_RX_GAIN  Set Rx Gain for FXO/FXS
WP_API_EVENT_FAX_1100  IN: FAX 1100 Tone event
WP_API_EVENT_FAX_2100  IN: FAX 2100 Tone event
WP_API_EVENT_FAX_2100_WSPR  IN: FAX 2100 WSPR Tone event

Definition at line 316 of file wanpipe_api_iface.h.


Generated on Wed Jun 1 17:30:47 2011 for libsangoma by  doxygen 1.5.6