Commit 4ad519a8 authored by Arne Øslebø's avatar Arne Øslebø

bugfix for Napatech NT support

git-svn-id: file:///home/svn/mapi/trunk@1494 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 56b3aefc
......@@ -602,7 +602,7 @@ AS_HELP_STRING([--with-libnapatech=DIR], [Manual libnapatech path configuration,
if test "x$incdir" != "x" -a -f $withval/lib/libntcommoninterface.so; then
owd=`pwd`
if cd $withval; then withval=`pwd`; cd $owd; fi
NAPATECHINC="-I$incdir"
NAPATECHINC="-I$incdir -D_NT_OS_TYPE=_NT_OS_TYPE_LINUX"
NAPATECHLIB="-L$withval/lib -lntcommoninterface"
else
AC_MSG_ERROR(NTCommonInterface.h or libntcommoninterface.so not found in $withval/include and $withval/lib)
......
......@@ -209,7 +209,9 @@ process_pkts(BufferInformationSectionType1_t* bufferInformation, napatech_instan
frame = ((uint8_t*)descriptor);
mhdr.ts = descriptor->Timestamp;
mhdr.ts = ((4503599*(descriptor->Timestamp>>32))>>20)|(descriptor->Timestamp<<32) ;
mhdr.ifindex = descriptor->Channel;
mhdr.caplen = descriptor->StoredLength;
mhdr.wlen = descriptor->WireLength;
......@@ -239,7 +241,8 @@ process_pkts(BufferInformationSectionType1_t* bufferInformation, napatech_instan
frame = ((uint8_t*)descriptor);
mhdr.ts = descriptor->Timestamp;
//Todo: temporary solution.
mhdr.ts = ((4503599*(descriptor->Timestamp>>32))>>20)|(descriptor->Timestamp<<32) ;
mhdr.ifindex = descriptor->Channel;
mhdr.caplen = descriptor->StoredLength;
mhdr.wlen = descriptor->WireLength;
......@@ -527,7 +530,7 @@ mapidrv_create_flow (int devid, int fd, char **devtype)
feedConfig.bufferType = BUFFER_SECTION;
/* hardware native timestamps */
feedConfig.timestampType = TIMESTAMP_NATIVE;
feedConfig.timestampType = TIMESTAMP_PCAP_NANOTIME;
/* do not deliver corrupted packets */
feedConfig.dropErroredPacketsFlag = 0;
......
AM_CPPFLAGS = -I$(srcdir)/.. -I$(srcdir)/../lib -I$(srcdir)/../drivers -I$(srcdir)/../common @NAPATECHINC@ -D_GNU_SOURCE -D_THREAD_SAFE
AM_CPPFLAGS = -I$(srcdir)/.. -I$(srcdir)/../lib -I$(srcdir)/../drivers -I$(srcdir)/../common @NAPATECHINC@ -D_NT_OS_TYPE=_NT_OS_TYPE_LINUX -D_GNU_SOURCE -D_THREAD_SAFE
libdir = $(pkgdatadir)
# napatechflib
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment