Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arne Øslebø
mapi
Commits
4ad519a8
Commit
4ad519a8
authored
Apr 28, 2009
by
Arne Øslebø
Browse files
bugfix for Napatech NT support
git-svn-id:
file:///home/svn/mapi/trunk@1494
8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent
56b3aefc
Changes
3
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
4ad519a8
...
...
@@ -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)
...
...
src/drivers/mapinapatechdrv.c
View file @
4ad519a8
...
...
@@ -208,8 +208,10 @@ process_pkts(BufferInformationSectionType1_t* bufferInformation, napatech_instan
PacketExtDescriptorType05_t
*
pExtDescr
=
(
PacketExtDescriptorType05_t
*
)(((
uint8_t
*
)
descriptor
)
+
sizeof
(
PacketDescriptorType2_t
));
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_
NA
TI
V
E
;
feedConfig
.
timestampType
=
TIMESTAMP_
PCAP_NANO
TI
M
E
;
/* do not deliver corrupted packets */
feedConfig
.
dropErroredPacketsFlag
=
0
;
...
...
src/napatechflib/Makefile.am
View file @
4ad519a8
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment