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
4d770fb0
Commit
4d770fb0
authored
Sep 28, 2013
by
Brickner_cp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IPv6
parent
0bea8462
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
IpV6ExtensionHeader.cs
...DotNet/src/PcapDotNet.Packets/IpV6/IpV6ExtensionHeader.cs
+3
-0
IpV6ExtensionHeaderFragmentData.cs
...capDotNet.Packets/IpV6/IpV6ExtensionHeaderFragmentData.cs
+5
-2
IpV6ExtensionHeaderRoutingRpl.cs
.../PcapDotNet.Packets/IpV6/IpV6ExtensionHeaderRoutingRpl.cs
+1
-1
No files found.
PcapDotNet/src/PcapDotNet.Packets/IpV6/IpV6ExtensionHeader.cs
View file @
4d770fb0
...
@@ -50,6 +50,9 @@ namespace PcapDotNet.Packets.IpV6
...
@@ -50,6 +50,9 @@ namespace PcapDotNet.Packets.IpV6
{
{
buffer
.
Write
(
offset
+
Offset
.
NextHeader
,
(
byte
)
NextHeader
);
buffer
.
Write
(
offset
+
Offset
.
NextHeader
,
(
byte
)
NextHeader
);
int
length
=
Length
;
int
length
=
Length
;
// TODO: Remove this check.
if
(
length
%
8
!=
0
)
throw
new
InvalidOperationException
(
"Must be divided by 8."
);
buffer
.
Write
(
offset
+
Offset
.
HeaderExtensionLength
,
(
byte
)((
length
/
8
)
-
1
));
buffer
.
Write
(
offset
+
Offset
.
HeaderExtensionLength
,
(
byte
)((
length
/
8
)
-
1
));
WriteData
(
buffer
,
offset
+
Offset
.
Data
);
WriteData
(
buffer
,
offset
+
Offset
.
Data
);
offset
+=
length
;
offset
+=
length
;
...
...
PcapDotNet/src/PcapDotNet.Packets/IpV6/IpV6ExtensionHeaderFragmentData.cs
View file @
4d770fb0
...
@@ -262,12 +262,15 @@ namespace PcapDotNet.Packets.IpV6
...
@@ -262,12 +262,15 @@ namespace PcapDotNet.Packets.IpV6
{
{
if
(
messageDataMobilityOptionsOffset
.
HasValue
)
if
(
messageDataMobilityOptionsOffset
.
HasValue
)
{
{
int
mobilityOptionsExtraBytes
=
(
messageDataMobilityOptionsOffset
.
Value
-
2
)
%
8
;
int
mobilityOptionsExtraBytes
=
(
8
-
(
messageDataMobilityOptionsOffset
.
Value
+
6
)
%
8
)
%
8
;
if
(
mobilityOptions
.
BytesLength
%
8
!=
mobilityOptionsExtraBytes
)
if
(
mobilityOptions
.
BytesLength
%
8
!=
mobilityOptionsExtraBytes
)
mobilityOptions
=
mobilityOptions
.
Pad
((
8
+
mobilityOptionsExtraBytes
-
(
mobilityOptions
.
BytesLength
%
8
))
%
8
);
mobilityOptions
=
mobilityOptions
.
Pad
((
8
+
mobilityOptionsExtraBytes
-
(
mobilityOptions
.
BytesLength
%
8
))
%
8
);
}
}
Checksum
=
checksum
;
Checksum
=
checksum
;
MobilityOptions
=
mobilityOptions
;
MobilityOptions
=
mobilityOptions
;
// TODO: Remove this.
if
(
Length
%
8
!=
0
)
throw
new
InvalidOperationException
(
"Must divide by 8"
);
}
}
/// <summary>
/// <summary>
...
@@ -1834,7 +1837,7 @@ namespace PcapDotNet.Packets.IpV6
...
@@ -1834,7 +1837,7 @@ namespace PcapDotNet.Packets.IpV6
/// | 16 | MH Type | Reserved |
/// | 16 | MH Type | Reserved |
/// +-----+-------------+-------------------------+
/// +-----+-------------+-------------------------+
/// | 32 | Checksum |
/// | 32 | Checksum |
/// +-----+-------------
+
-------------------------+
/// +-----+-------------
-
-------------------------+
/// | 48 | Mobility Options |
/// | 48 | Mobility Options |
/// | ... | |
/// | ... | |
/// +-----+---------------------------------------+
/// +-----+---------------------------------------+
...
...
PcapDotNet/src/PcapDotNet.Packets/IpV6/IpV6ExtensionHeaderRoutingRpl.cs
View file @
4d770fb0
...
@@ -82,7 +82,7 @@ namespace PcapDotNet.Packets.IpV6
...
@@ -82,7 +82,7 @@ namespace PcapDotNet.Packets.IpV6
Addresses
=
addresses
.
AsReadOnly
();
Addresses
=
addresses
.
AsReadOnly
();
PadSize
=
(
byte
)((
8
-
RoutingData
Length
%
8
)
%
8
);
PadSize
=
(
byte
)((
8
-
Length
%
8
)
%
8
);
}
}
public
override
IpV6RoutingType
RoutingType
public
override
IpV6RoutingType
RoutingType
...
...
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