libhpsangoma: libhpsangoma_priv.h Source File

- Main Page
- Classes
- Files

# libhpsangoma_priv.h

    00001 /*****************************************************************************
    00002  * libhpsangoma.h : Sangoma High Performance TDM API - Span Based Library
    00003  *
    00004  * Author(s):   Nenad Corbic <ncorbic@sangoma.com>
    00005  *
    00006  * Copyright:   (c) 2008 Nenad Corbic <ncorbic@sangoma.com>
    00007  *
    00008  *              This program is free software; you can redistribute it and/or
    00009  *              modify it under the terms of the GNU General Public License
    00010  *              as published by the Free Software Foundation; either version
    00011  *              2 of the License, or (at your option) any later version.
    00012  * ============================================================================
    00013  */
    00014
    00015 #ifndef _LIB_HP_SANGOMA_PRIV_H
    00016 #define _LIB_HP_SANGOMA_PRIV_H
    00017
    00018 #include "libhpsangoma.h"
    00019
    00020
    00025 #define lib_printf(level, fp, fmt, ...) if (lib_log) lib_log(level, fp, __FILE__, __FUNCTION__, __LINE__, fmt, ##__VA_ARGS__)
    00026
    00027 extern void (*lib_log)(int level, FILE *fp, char *file, const char *func, int line, char *fmt, ...);
    00028
    00029
    00030 /*---------------------------------------------------------
    00031  * PRIVATE - FUNCTIONS
    00032  */
    00033
    00044 int sangoma_readmsg_hp_tdm(int fd, void *hdrbuf, int hdrlen, void *databuf, int datalen, int flag);
    00045
    00046
    00057 int sangoma_writemsg_hp_tdm(int fd, void *hdrbuf, int hdrlen, void *databuf, unsigned short datalen, int flag);
    00058
    00064 int do_wanpipemon_cmd(sangoma_hptdm_span_t *span);
    00065
    00066
    00072 unsigned char sangoma_get_cfg(sangoma_hptdm_span_t *span);
    00073
    00074
    00080 int sangoma_hptdm_span_open(sangoma_hptdm_span_t *span);
    00081
    00082
    00088 int sangoma_hp_tdm_handle_oob_event(sangoma_hptdm_span_t *span);
    00089
    00090
    00096 int sangoma_hp_tdm_push_rx_data(sangoma_hptdm_span_t *span);
    00097
    00098
    00104 int sangoma_hp_tdm_handle_read_event(sangoma_hptdm_span_t *span);
    00105
    00106
    00112 int sangoma_hp_tdm_handle_write_event(sangoma_hptdm_span_t *span);
    00113
    00114
    00115
    00116
    00117 #endif
    00118