Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pcap-Net
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Pcap-Net
Commits
2b00538a
Commit
2b00538a
authored
Sep 26, 2014
by
Brickner_cp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2 warnings left.
parent
c997f2f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
PppFrameCheckSequenceCalculator.cs
...t.Packets/IpV6/Options/PppFrameCheckSequenceCalculator.cs
+4
-4
No files found.
PcapDotNet/src/PcapDotNet.Packets/IpV6/Options/PppFrameCheckSequenceCalculator.cs
View file @
2b00538a
...
@@ -21,16 +21,16 @@ namespace PcapDotNet.Packets.IpV6
...
@@ -21,16 +21,16 @@ namespace PcapDotNet.Packets.IpV6
/// <summary>
/// <summary>
/// Calculates FCS16.
/// Calculates FCS16.
/// </summary>
/// </summary>
public
static
ushort
CalculateFrameCheckSequence16
(
ushort
f
cs
,
IEnumerable
<
byte
>
values
)
public
static
ushort
CalculateFrameCheckSequence16
(
ushort
f
rameCheckSequence
,
IEnumerable
<
byte
>
values
)
{
{
if
(
values
==
null
)
if
(
values
==
null
)
throw
new
ArgumentNullException
(
"values"
);
throw
new
ArgumentNullException
(
"values"
);
foreach
(
byte
value
in
values
)
foreach
(
byte
value
in
values
)
{
{
ushort
tableValue
=
_fcsTable
[(
f
cs
^
value
)
&
0xff
];
ushort
tableValue
=
_fcsTable
[(
f
rameCheckSequence
^
value
)
&
0xff
];
f
cs
=
(
ushort
)((
fcs
>>
8
)
^
tableValue
);
f
rameCheckSequence
=
(
ushort
)((
frameCheckSequence
>>
8
)
^
tableValue
);
}
}
return
f
cs
;
return
f
rameCheckSequence
;
}
}
private
static
readonly
ushort
[]
_fcsTable
=
private
static
readonly
ushort
[]
_fcsTable
=
...
...
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