wanpipe_api_hdr.h File Reference

WANPIPE(tm) Driver API Headers and Defines. More...

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

Go to the source code of this file.

Classes

struct  wp_api_event
 Wanpipe API Event Structure. More...
struct  wp_api_hdr
struct  wp_api_element
 Wanpipe API Element contains header and data. More...
struct  _API_POLL_STRUCT
 Windows poll structure used to implement blocking poll for read/write/event. More...

Defines

#define WAN_MAX_EVENT_SZ   64
 Size of wanpipe api header used in tx/rx.
#define WAN_MAX_EVENT_SZ_UNION   WAN_MAX_EVENT_SZ-(sizeof(u_int8_t)*4)-(sizeof(u_int32_t)*2)
#define wp_api_event_type   event_type
#define wp_api_event_mode   mode
#define wp_api_event_channel   channel
#define wp_api_event_span   span
#define wp_api_event_alarm   te1_alarm.alarm
#define wp_api_event_rbs_bits   te1_rbs.rbs_bits
#define wp_api_event_hook_state   rm_hook.state
#define wp_api_event_hook_sig   rm_hook.sig
#define wp_api_event_ring_state   rm_ring.state
#define wp_api_event_tone_type   rm_tone.type
#define wp_api_event_dtmf_digit   dtmf.digit
#define wp_api_event_dtmf_type   dtmf.type
#define wp_api_event_dtmf_port   dtmf.port
#define wp_api_event_ohttimer   rm_common.ohttimer
#define wp_api_event_polarity   rm_common.polarity
#define wp_api_event_link_status   linkstatus.status
#define wp_api_event_serial_status   serial.status
#define wp_api_event_time_stamp_sec   time_stamp_sec
#define wp_api_event_time_stamp_usec   time_stamp_usec
#define WAN_MAX_HDR_SZ   64
 Size of wanpipe api header used in tx/rx.
#define WAN_MAX_HDR_SZ_UNION   WAN_MAX_HDR_SZ-sizeof(u_int8_t)-sizeof(u_int16_t)-(sizeof(u_int32_t)*2)
#define wp_api_hdr_operation_status   operation_status
#define wp_api_hdr_data_length   data_length
#define wp_api_hdr_time_stamp_sec   time_stamp_sec
#define wp_api_hdr_time_stamp_use   time_stamp_usec
#define wp_api_rx_hdr_crc   rx_h.crc
#define wp_api_rx_hdr_max_queue_length   rx_h.max_rx_queue_length
#define wp_api_rx_hdr_number_of_frames_in_queue   rx_h.current_number_of_frames_in_rx_queue
#define wp_api_rx_hdr_time_stamp_sec   time_stamp_sec
#define wp_api_rx_hdr_time_stamp_use   time_stamp_usec
#define wp_api_tx_hdr_max_queue_length   tx_h.max_tx_queue_length
#define wp_api_tx_hdr_number_of_frames_in_queue   tx_h.current_number_of_frames_in_tx_queue
#define wp_api_tx_hdr_time_stamp_sec   time_stamp_sec
#define wp_api_tx_hdr_time_stamp_use   time_stamp_usec
#define wp_api_rx_hdr_error_flag   operation_status
#define wp_api_rx_hdr_time_stamp   data_length
#define wp_api_tx_hdr_hdlc_rpt_len   rtp.len
#define wp_api_tx_hdr_hdlc_rpt_data   rtp.data
#define wp_api_tx_hdr_hdlc_rpt_repeat   rtp.repeat
#define wp_api_tx_hdr_aft_ss7_type   ss7_hw.type
#define wp_api_tx_hdr_aft_ss7_force_tx   ss7_hw.force_tx
#define wp_api_tx_hdr_aft_ss7_data   ss7_hw.data
#define wp_api_rx_hdr_xdlc_state   xdlc.state
#define wp_api_rx_hdr_xdlc_address   xdlc.address
#define wp_api_rx_hdr_xdlc_exception   xdlc.exception
#define wan_hdr_xdlc_state   xdlc.state
#define wan_hdr_xdlc_address   xdlc.address
#define wan_hdr_xdlc_exception   xdlc.exception
#define wp_api_rx_hdr_chdlc_error_flag   wp_api_rx_hdr_error_flag
#define wp_api_rx_hdr_chdlc_time_stamp   wp_api_rx_hdr_time_stamp
#define wp_api_rx_hdr_chdlc_time_sec   chdlc.time_stamp_sec
#define wp_api_rx_hdr_chdlc_time_usec   chdlc.time_stamp_usec
#define wan_hdr_chdlc_error_flag   wp_api_rx_hdr_chdlc_error_flag
#define wan_hdr_chdlc_time_stamp   wp_api_rx_hdr_chdlc_time_stamp
#define wan_hdr_chdlc_time_sec   wp_api_rx_hdr_chdlc_time_sec
#define wan_hdr_chdlc_time_usec   wp_api_rx_hdr_chdlc_time_usec
#define wp_api_rx_hdr_bitstrm_error_flag   wp_api_rx_hdr_error_flag
#define wp_api_rx_hdr_bitstrm_time_stamp   wp_api_rx_hdr_time_stamp
#define wp_api_rx_hdr_bitstrm_time_sec   bitstrm.time_stamp_sec
#define wp_api_rx_hdr_bitstrm_time_usec   bitstrm.time_stamp_usec
#define wp_api_rx_hdr_bitstrm_channel   bitstrm.channel
#define wp_api_rx_hdr_bitstrm_direction   bitstrm.direction
#define wan_hdr_bitstrm_error_flag   wp_api_rx_hdr_bitstrm_error_flag
#define wan_hdr_bitstrm_time_stamp   wp_api_rx_hdr_bitstrm_data_length
#define wan_hdr_bitstrm_time_sec   wp_api_rx_hdr_bitstrm_time_sec
#define wan_hdr_bitstrm_time_usec   wp_api_rx_hdr_bitstrm_time_usec
#define wan_hdr_bitstrm_channel   wp_api_rx_hdr_bitstrm_channel
#define wan_hdr_bitstrm_direction   wp_api_rx_hdr_bitstrm_direction
#define wp_api_rx_hdr_hdlc_error_flag   wp_api_rx_hdr_error_flag
#define wp_api_rx_hdr_hdlc_time_stamp   wp_api_rx_hdr_time_stamp
#define wp_api_rx_hdr_hdlc_time_sec   hdlc.time_stamp_sec
#define wp_api_rx_hdr_hdlc_time_usec   hdlc.time_stamp_usec
#define wan_hdr_hdlc_error_flag   wp_api_rx_hdr_error_flag
#define wan_hdr_hdlc_time_stamp   wp_api_rx_hdr_time_stamp
#define wp_api_rx_hdr_lapb_pf   lapb.pf
#define wp_api_rx_hdr_lapb_exception   lapb.exception
#define wp_api_rx_hdr_lapb_time_sec   lapb.time_stamp_sec
#define wp_api_rx_hdr_lapb_time_usec   lapb.time_stamp_usec
#define wan_hdr_lapb_pf   wp_api_rx_hdr_lapb_pf
#define wan_hdr_lapb_exception   wp_api_rx_hdr_lapb_exception
#define wp_api_rx_hdr_fr_attr   wp_api_rx_hdr_error_flag
#define wp_api_rx_hdr_fr_time_stamp   wp_api_rx_hdr_time_stamp
#define wp_api_rx_hdr_fr_time_sec   fr.time_stamp_sec
#define wp_api_rx_hdr_fr_time_usec   fr.time_stamp_usec
#define wan_hdr_fr_attr   wp_api_rx_hdr_fr_attr
#define wan_hdr_fr_time_stamp   wp_api_rx_hdr_fr_time_stamp
#define wan_hdr_fr_time_sec   wp_api_rx_hdr_fr_time_sec
#define wan_hdr_fr_time_usec   wp_api_rx_hdr_fr_time_usec
#define wp_api_rx_hdr_ss7_legacy_sio   wp_api_rx_hdr_error_flag
#define wp_api_rx_hdr_ss7_legacy_time_stamp   wp_api_rx_hdr_time_stamp
#define wp_api_rx_hdr_event_serial_status   serial.status
#define MAX_NO_DATA_BYTES_IN_FRAME   8188
 Maximum tx/rx data size.
#define wp_api_el_operation_status   hdr.wp_api_hdr_operation_status
#define wp_api_el_data_length   hdr.wp_api_hdr_data_length
#define wp_api_el_time_stamp_sec   hdr.wp_api_hdr_time_stamp_sec
#define wp_api_el_time_stamp_use   hdr.wp_api_hdr_time_stamp_use
#define wp_api_rx_el_crc   hdr.wp_api_rx_hdr_crc
#define wp_api_rx_el_max_queue_length   hdr.wp_api_rx_hdr_max_queue_length
#define wp_api_rx_el_number_of_frames_in_queue   hdr.wp_api_rx_hdr_number_of_frames_in_queue
#define wp_api_tx_el_max_queue_length   hdr.wp_api_tx_hdr_max_queue_length
#define wp_api_tx_el_number_of_frames_in_queue   hdr.wp_api_tx_hdr_number_of_frames_in_queue
#define SDLA_DECODE_SANG_STATUS(status)
 Print decode of Sangoma Return Codes.

Typedefs

typedef wp_api_event wp_api_event_t
typedef wp_api_hdr wp_api_hdr_t
 Wanpipe API Header Structure.
typedef wp_api_element wp_api_element_t
 Wanpipe API Element contains header and data.
typedef _API_POLL_STRUCT API_POLL_STRUCT
 Windows poll structure used to implement blocking poll for read/write/even.
typedef enum SANG_STATUS SANG_STATUS_T
 Wanpipe API Return codes.

Enumerations

enum  SANG_STATUS {
  SANG_STATUS_SUCCESS = 0, SANG_STATUS_RX_DATA_TIMEOUT, SANG_STATUS_RX_DATA_AVAILABLE, SANG_STATUS_NO_DATA_AVAILABLE,
  SANG_STATUS_TX_TIMEOUT, SANG_STATUS_TX_DATA_TOO_LONG, SANG_STATUS_TX_DATA_TOO_SHORT, SANG_STATUS_TX_HDR_TOO_SHORT,
  SANG_STATUS_LINE_DISCONNECTED, SANG_STATUS_PROTOCOL_DISCONNECTED, SANG_STATUS_LINE_CONNECTED, SANG_STATUS_PROTOCOL_CONNECTED,
  SANG_STATUS_COMMAND_ALREADY_RUNNING, SANG_STATUS_BUFFER_TOO_SMALL, SANG_STATUS_FAILED_TO_LOCK_USER_MEMORY, SANG_STATUS_FAILED_ALLOCATE_MEMORY,
  SANG_STATUS_INVALID_DEVICE_REQUEST, SANG_STATUS_INVALID_PARAMETER, SANG_STATUS_GENERAL_ERROR, SANG_STATUS_DEVICE_BUSY,
  SANG_STATUS_INVALID_DEVICE, SANG_STATUS_IO_ERROR, SANG_STATUS_UNSUPPORTED_FUNCTION, SANG_STATUS_UNSUPPORTED_PROTOCOL,
  SANG_STATUS_DEVICE_ALREADY_EXIST, SANG_STATUS_DEV_INIT_INCOMPLETE, SANG_STATUS_TRACE_QUEUE_EMPTY, SANG_STATUS_OPTION_NOT_SUPPORTED,
  SANG_STATUS_API_EVENT_AVAILABLE, SANG_STATUS_CAN_NOT_STOP_DEVICE_WHEN_ALREADY_STOPPED, SANG_STATUS_CAN_NOT_RUN_TWO_PORT_CMDS_AT_THE_SAME_TIME, SANG_STATUS_ASSOCIATED_IRP_SYSTEM_BUFFER_NULL_ERROR,
  SANG_STATUS_STRUCTURE_SIZE_MISMATCH_ERROR, SANG_STATUS_REGISTRY_ERROR = 180, SANG_STATUS_DATA_QUEUE_EMPTY = 190, SANG_STATUS_DATA_QUEUE_FULL,
  SANG_STATUS_INVALID_IRQL
}
 Wanpipe API Return codes. More...


Detailed Description

WANPIPE(tm) Driver API Headers and Defines.

Authors: Nenad Corbic <ncorbic@sangoma.com> David Rokhvarg <davidr@sangoma.com> Alex Fledman <alex@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_hdr.h.


Define Documentation

#define WAN_MAX_EVENT_SZ   64

Size of wanpipe api header used in tx/rx.

The WAN_MAX_HDR_SZ is the size of wp_api_event_t structure It can be used to confirm compilation problems. if (sizeof(wp_api_event_t) != WAN_MAX_HDR_SZ) ...

Definition at line 49 of file wanpipe_api_hdr.h.

#define wp_api_event_type   event_type

These defines MUST be used to access wp_api_event_t structure. The wp_api_event_t should not be accessed directly, in order to keep backward compile compatibility.

Definition at line 108 of file wanpipe_api_hdr.h.

#define WAN_MAX_HDR_SZ   64

Size of wanpipe api header used in tx/rx.

The WAN_MAX_HDR_SZ is the size of wp_api_event_t structure It can be used to confirm compilation problems. if (sizeof(wp_api_event_t) != WAN_MAX_HDR_SZ) ...

Definition at line 149 of file wanpipe_api_hdr.h.

#define wp_api_hdr_operation_status   operation_status

These defines MUST be used to access wp_api_hdr_t structure. The wp_api_hdr_t should not be accessed directly, in order to keep backward compile compatibility.

Definition at line 232 of file wanpipe_api_hdr.h.

#define wp_api_rx_hdr_error_flag   operation_status

Defines below are Deprecated and are for backward compability

Definition at line 254 of file wanpipe_api_hdr.h.

#define wp_api_el_operation_status   hdr.wp_api_hdr_operation_status

These defines MUST be used to access wp_api_element_t structure. The wp_api_element_t should not be accessed directly, in order to keep backward compile compatibility.

Definition at line 374 of file wanpipe_api_hdr.h.


Enumeration Type Documentation

enum SANG_STATUS

Wanpipe API Return codes.

Extra care should be taken when changing SANG_STATUS_xxx definitions to keep compatibility with existing binary files!

Enumerator:
SANG_STATUS_SUCCESS  An operation completed successfully
SANG_STATUS_RX_DATA_TIMEOUT  Return codes specific for data reception: No data was received. NOT an error.
SANG_STATUS_RX_DATA_AVAILABLE  Data was received.
SANG_STATUS_NO_DATA_AVAILABLE  There is no RX data in API receive queue
SANG_STATUS_TX_TIMEOUT  Return codes specific for data transmission: Transmit command timed out
SANG_STATUS_TX_DATA_TOO_LONG  Longer than MTU
SANG_STATUS_TX_DATA_TOO_SHORT  Shorter than minimum
SANG_STATUS_TX_HDR_TOO_SHORT  Tx Header is too short
SANG_STATUS_LINE_DISCONNECTED  Return codes specific for line status: Physical line (T1/E1/Serial) is disconnected.
SANG_STATUS_PROTOCOL_DISCONNECTED  The Communication Protocol (CHDLC/Frame Relay/PPP/LAPD...) is disconnected
SANG_STATUS_LINE_CONNECTED  Physical line (T1/E1/Serial) is connected.
SANG_STATUS_PROTOCOL_CONNECTED  The Communication Protocol (CHDLC/Frame Relay/PPP/LAPD...) is connected
SANG_STATUS_COMMAND_ALREADY_RUNNING  Return codes specific for general errors: Two threads attempting to access device at the same time.
SANG_STATUS_BUFFER_TOO_SMALL  Buffer passed to API is too small.
SANG_STATUS_FAILED_TO_LOCK_USER_MEMORY  Kernel error
SANG_STATUS_FAILED_ALLOCATE_MEMORY  Memory allocatin failure
SANG_STATUS_INVALID_DEVICE_REQUEST  Command is invalid for device type.
SANG_STATUS_INVALID_PARAMETER  Invalide parameter
SANG_STATUS_GENERAL_ERROR  General interal error
SANG_STATUS_DEVICE_BUSY  Device is busy
SANG_STATUS_INVALID_DEVICE  Invalid device selected
SANG_STATUS_IO_ERROR  IO error on device
SANG_STATUS_UNSUPPORTED_FUNCTION  Unsupported command or function
SANG_STATUS_UNSUPPORTED_PROTOCOL  Unsupported protocol selected
SANG_STATUS_DEVICE_ALREADY_EXIST  Device already exists
SANG_STATUS_DEV_INIT_INCOMPLETE  Device initialization failed
SANG_STATUS_TRACE_QUEUE_EMPTY  Trace queueu empty
SANG_STATUS_OPTION_NOT_SUPPORTED  Unsupported command or option
SANG_STATUS_API_EVENT_AVAILABLE  Wanpipe API Event Available Wanpipe API Event is available
SANG_STATUS_CAN_NOT_STOP_DEVICE_WHEN_ALREADY_STOPPED  API Operation Internal errors Failed to stop device, already stopped
SANG_STATUS_CAN_NOT_RUN_TWO_PORT_CMDS_AT_THE_SAME_TIME  Failed to execute command, busy due to collision
SANG_STATUS_STRUCTURE_SIZE_MISMATCH_ERROR  Header size mistmatch between user & driver. Recompilation is necessary
SANG_STATUS_REGISTRY_ERROR  Windows Specific definitions Windows Registry Error
SANG_STATUS_DATA_QUEUE_EMPTY  For internal API use only. Range reserved for internal API use start queue empty
SANG_STATUS_DATA_QUEUE_FULL  queue empty full
SANG_STATUS_INVALID_IRQL  Driver routine was called at invalid IRQL.

Definition at line 420 of file wanpipe_api_hdr.h.

00421 {
00422 
00423     SANG_STATUS_SUCCESS=0,                  
00425     /*************************************/
00428     SANG_STATUS_RX_DATA_TIMEOUT,            
00429     SANG_STATUS_RX_DATA_AVAILABLE,          
00430     SANG_STATUS_NO_DATA_AVAILABLE,          
00432     /*************************************/
00435     SANG_STATUS_TX_TIMEOUT,                 
00436     SANG_STATUS_TX_DATA_TOO_LONG,           
00437     SANG_STATUS_TX_DATA_TOO_SHORT,          
00438     SANG_STATUS_TX_HDR_TOO_SHORT,           
00440     /*************************************/
00443     SANG_STATUS_LINE_DISCONNECTED,          
00444     SANG_STATUS_PROTOCOL_DISCONNECTED,      
00445     SANG_STATUS_LINE_CONNECTED,             
00446     SANG_STATUS_PROTOCOL_CONNECTED,         
00448     /*************************************/
00452     SANG_STATUS_COMMAND_ALREADY_RUNNING,    
00453     SANG_STATUS_BUFFER_TOO_SMALL,           
00454     SANG_STATUS_FAILED_TO_LOCK_USER_MEMORY, 
00455     SANG_STATUS_FAILED_ALLOCATE_MEMORY,     
00456     SANG_STATUS_INVALID_DEVICE_REQUEST,     
00457     SANG_STATUS_INVALID_PARAMETER,          
00458     SANG_STATUS_GENERAL_ERROR,              
00459     SANG_STATUS_DEVICE_BUSY,                
00460     SANG_STATUS_INVALID_DEVICE,             
00461     SANG_STATUS_IO_ERROR,                   
00462     SANG_STATUS_UNSUPPORTED_FUNCTION,       
00463     SANG_STATUS_UNSUPPORTED_PROTOCOL,       
00464     SANG_STATUS_DEVICE_ALREADY_EXIST,       
00465     SANG_STATUS_DEV_INIT_INCOMPLETE,        
00466     SANG_STATUS_TRACE_QUEUE_EMPTY,          
00467     SANG_STATUS_OPTION_NOT_SUPPORTED,       
00469     /*************************************/
00472     SANG_STATUS_API_EVENT_AVAILABLE,        
00475     /*************************************/
00478     SANG_STATUS_CAN_NOT_STOP_DEVICE_WHEN_ALREADY_STOPPED,       
00479     SANG_STATUS_CAN_NOT_RUN_TWO_PORT_CMDS_AT_THE_SAME_TIME,     
00480     SANG_STATUS_ASSOCIATED_IRP_SYSTEM_BUFFER_NULL_ERROR,        
00481     SANG_STATUS_STRUCTURE_SIZE_MISMATCH_ERROR,      
00484     /*************************************/
00487     SANG_STATUS_REGISTRY_ERROR=180,             
00489     /****************************************/
00493     SANG_STATUS_DATA_QUEUE_EMPTY=190,           
00494     SANG_STATUS_DATA_QUEUE_FULL,                
00495     SANG_STATUS_INVALID_IRQL                    
00497 }SANG_STATUS_T;


Generated on Tue Jan 6 18:09:04 2009 for libsangoma by  doxygen 1.4.7