Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arne Øslebø
mapi
Commits
56b3aefc
Commit
56b3aefc
authored
Apr 18, 2009
by
Browse files
Fixed napatech driver.
git-svn-id:
file:///home/svn/mapi/trunk@1490
8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent
6975ddd1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/drivers/mapinapatechdrv.c
View file @
56b3aefc
...
@@ -207,7 +207,7 @@ process_pkts(BufferInformationSectionType1_t* bufferInformation, napatech_instan
...
@@ -207,7 +207,7 @@ process_pkts(BufferInformationSectionType1_t* bufferInformation, napatech_instan
PacketExtDescriptorType05_t
*
pExtDescr
=
(
PacketExtDescriptorType05_t
*
)(((
uint8_t
*
)
descriptor
)
+
sizeof
(
PacketDescriptorType2_t
));
PacketExtDescriptorType05_t
*
pExtDescr
=
(
PacketExtDescriptorType05_t
*
)(((
uint8_t
*
)
descriptor
)
+
sizeof
(
PacketDescriptorType2_t
));
frame
=
((
uint8_t
*
)
descriptor
)
+
sizeof
(
PacketDescriptorType2_t
)
+
(
descriptor
->
ExtensionLength
<<
3
)
;
frame
=
((
uint8_t
*
)
descriptor
);
mhdr
.
ts
=
descriptor
->
Timestamp
;
mhdr
.
ts
=
descriptor
->
Timestamp
;
mhdr
.
ifindex
=
descriptor
->
Channel
;
mhdr
.
ifindex
=
descriptor
->
Channel
;
...
@@ -228,7 +228,7 @@ process_pkts(BufferInformationSectionType1_t* bufferInformation, napatech_instan
...
@@ -228,7 +228,7 @@ process_pkts(BufferInformationSectionType1_t* bufferInformation, napatech_instan
}
}
// ? TODO - modify third argument to pass test_packet_read
// ? TODO - modify third argument to pass test_packet_read
mapid_process_pkt
(
&
i
->
mapidlib
,
(
unsigned
char
*
)
frame
,
frame
+
(
descriptor
->
StoredLength
-
descriptor
->
Wire
Length
),
&
mhdr
);
mapid_process_pkt
(
&
i
->
mapidlib
,
(
unsigned
char
*
)
frame
,
frame
+
sizeof
(
PacketDescriptorType2_t
)
+
(
descriptor
->
Extension
Length
<<
3
),
&
mhdr
);
/* Avance to the next packet. */
/* Avance to the next packet. */
descriptor
=
(
PacketDescriptorType2_t
*
)((
uint8_t
*
)
descriptor
+
descriptor
->
StoredLength
);
descriptor
=
(
PacketDescriptorType2_t
*
)((
uint8_t
*
)
descriptor
+
descriptor
->
StoredLength
);
...
@@ -237,7 +237,7 @@ process_pkts(BufferInformationSectionType1_t* bufferInformation, napatech_instan
...
@@ -237,7 +237,7 @@ process_pkts(BufferInformationSectionType1_t* bufferInformation, napatech_instan
for
(
packet
=
0
;
packet
<
bufferInformation
->
numDescriptorsAvailable
;
packet
++
)
{
for
(
packet
=
0
;
packet
<
bufferInformation
->
numDescriptorsAvailable
;
packet
++
)
{
i
->
hwinfo
.
pkts
++
;
i
->
hwinfo
.
pkts
++
;
frame
=
((
uint8_t
*
)
descriptor
)
+
sizeof
(
PacketDescriptorType2_t
)
;
frame
=
((
uint8_t
*
)
descriptor
);
mhdr
.
ts
=
descriptor
->
Timestamp
;
mhdr
.
ts
=
descriptor
->
Timestamp
;
mhdr
.
ifindex
=
descriptor
->
Channel
;
mhdr
.
ifindex
=
descriptor
->
Channel
;
...
@@ -245,7 +245,7 @@ process_pkts(BufferInformationSectionType1_t* bufferInformation, napatech_instan
...
@@ -245,7 +245,7 @@ process_pkts(BufferInformationSectionType1_t* bufferInformation, napatech_instan
mhdr
.
wlen
=
descriptor
->
WireLength
;
mhdr
.
wlen
=
descriptor
->
WireLength
;
// ? TODO - modify third argument to pass test_packet_read
// ? TODO - modify third argument to pass test_packet_read
mapid_process_pkt
(
&
i
->
mapidlib
,
(
unsigned
char
*
)
frame
,
frame
+
(
descriptor
->
StoredLength
-
descriptor
->
WireLength
),
&
mhdr
);
mapid_process_pkt
(
&
i
->
mapidlib
,
(
unsigned
char
*
)
frame
,
frame
+
sizeof
(
PacketDescriptorType2_t
),
&
mhdr
);
/* Avance to the next packet. */
/* Avance to the next packet. */
descriptor
=
(
PacketDescriptorType2_t
*
)((
uint8_t
*
)
descriptor
+
descriptor
->
StoredLength
);
descriptor
=
(
PacketDescriptorType2_t
*
)((
uint8_t
*
)
descriptor
+
descriptor
->
StoredLength
);
...
...
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