include general.makefile $(ZAP_MODS)
+all: $(MYLIB)
+
$(MYLIB): $(OBJS)
ar rcs $(MYLIB) $(OBJS)
ranlib $(MYLIB)
-%.o: %.c
- $(CC) $(CFLAGS) -c $< -o $@
-all: $(MYLIB)
+zap_wanpipe.o: zap_wanpipe.c
+ $(CC) $(CFLAGS) $(ZAP_CFLAGS) $(WP_CFLAGS) -c $< -o $@
+
+zap_zt.o: zap_zt.c
+ $(CC) $(CFLAGS) $(ZAP_CFLAGS) $(ZT_CFLAGS) -c $< -o $@
+
+%.o: %.c
+ $(CC) $(CC_CFLAGS) $(CFLAGS) -c $< -o $@
clean:
rm -f *.o $(MYLIB) *~ \#*
CC=gcc
-CFLAGS += -Wall -Werror -Wextra -std=c99 -pedantic -ansi
+CC_CFLAGS += -Wall -Werror -Wextra -std=c99 -pedantic -ansi
*/
#define zap_copy_flags(dest, src, flags) (dest)->flags &= ~(flags); (dest)->flags |= ((src)->flags & (flags))
-
/*!
\brief Free a pointer and set it to NULL unless it already is NULL
\param it the pointer
#define ZINT_READ_MUZZLE assert(zchan != NULL); assert(data != NULL); assert(datalen != NULL)
#define ZINT_WRITE_MUZZLE assert(zchan != NULL); assert(data != NULL); assert(datalen != NULL)
-
struct zap_software_interface {
const char *name;
zint_configure_t configure;
char *var, *val;
unsigned configured = 0;
zap_software_interface_t *zint;
-
+
globals.interface_hash = create_hashtable(16, hashfromstring, equalkeys);
zint = NULL;
}
}
+ zap_config_close_file(&cfg);
+
return configured ? ZAP_SUCCESS : ZAP_FAIL;
}
CFLAGS +=-DZAP_WANPIPE_SUPPORT
OBJS += zap_wanpipe.o
+WANPIPE_INCLUDE=/usr/include/wanpipe
+#WANPIPE_INCLUDE=../../wanpipe-3.1.0.p18/patches/kdrivers/include
+
+WP_CFLAGS =-I$(WANPIPE_INCLUDE) -I/usr/local/include -I/usr/src/linux/include -I. -I/usr/include
+WP_CFLAGS +=-D__LINUX__ -D_REENTRANT -D_GNU_SOURCE -DAFT_A104 -DWANPIPE_TDM_API -D_GNUC_ -DWANPIPE_TDM_API
+
+
+
+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
#include "openzap.h"
#include "zap_wanpipe.h"
+#include <wanpipe_defines.h>
+#include <wanpipe_cfg.h>
+#include <wanpipe_tdm_api.h>
+#include <sdla_te1_pmc.h>
+#include <sdla_te1.h>
+#include <sdla_56k.h>
+#include <sdla_remora.h>
+#include <sdla_te3.h>
+#include <sdla_front_end.h>
+#include <sdla_aft_te1.h>
+
+struct wanpipe_channel {
+ struct zap_channel zchan;
+ int x;
+};
static ZINT_CONFIGURE_FUNCTION(wanpipe_configure)
{
+ zap_config_t cfg;
+ char *var, *val;
+ int catno = -1;
+
ZINT_CONFIGURE_MUZZLE;
+
+ if (!zap_config_open_file(&cfg, "wanpipe.conf")) {
+ return ZAP_FAIL;
+ }
+
+ while (zap_config_next_pair(&cfg, &var, &val)) {
+ if (!strcasecmp(cfg.category, "span")) {
+ if (cfg.catno != catno) {
+
+ }
+ }
+ }
+ zap_config_close_file(&cfg);
+
return ZAP_FAIL;
}