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
62a73ed7
Commit
62a73ed7
authored
Sep 08, 2012
by
Brickner_cp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IPv6
parent
2d5666f2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
517 additions
and
2 deletions
+517
-2
ByteArrayExtensions.cs
PcapDotNet/src/PcapDotNet.Packets/ByteArrayExtensions.cs
+25
-0
IpV6Datagram.cs
PcapDotNet/src/PcapDotNet.Packets/IpV6/IpV6Datagram.cs
+492
-2
No files found.
PcapDotNet/src/PcapDotNet.Packets/ByteArrayExtensions.cs
View file @
62a73ed7
...
@@ -701,6 +701,19 @@ namespace PcapDotNet.Packets
...
@@ -701,6 +701,19 @@ namespace PcapDotNet.Packets
Write
(
buffer
,
offset
,
value
);
Write
(
buffer
,
offset
,
value
);
}
}
/// <summary>
/// Writes the given value to the buffer using the given endianity and increments the offset by the number of bytes written.
/// </summary>
/// <param name="buffer">The buffer to write the value to.</param>
/// <param name="offset">The offset in the buffer to start writing.</param>
/// <param name="value">The value to write.</param>
/// <param name="endianity">The endianity to use when converting the value to bytes.</param>
public
static
void
Write
(
this
byte
[]
buffer
,
ref
int
offset
,
UInt128
value
,
Endianity
endianity
)
{
buffer
.
Write
(
offset
,
value
,
endianity
);
offset
+=
UInt128
.
SizeOf
;
}
/// <summary>
/// <summary>
/// Writes the given amount of least significant bytes of the value to the buffer using the given endianity.
/// Writes the given amount of least significant bytes of the value to the buffer using the given endianity.
/// Doesn't write leading zero bytes.
/// Doesn't write leading zero bytes.
...
@@ -853,6 +866,18 @@ namespace PcapDotNet.Packets
...
@@ -853,6 +866,18 @@ namespace PcapDotNet.Packets
buffer
.
Write
(
offset
,
value
.
ToValue
(),
endianity
);
buffer
.
Write
(
offset
,
value
.
ToValue
(),
endianity
);
}
}
/// <summary>
/// Writes the given value to the buffer using the given endianity and increments the offset by the number of bytes written.
/// </summary>
/// <param name="buffer">The buffer to write the value to.</param>
/// <param name="offset">The offset in the buffer to start writing.</param>
/// <param name="value">The value to write.</param>
/// <param name="endianity">The endianity to use when converting the value to bytes.</param>
public
static
void
Write
(
this
byte
[]
buffer
,
ref
int
offset
,
IpV6Address
value
,
Endianity
endianity
)
{
buffer
.
Write
(
ref
offset
,
value
.
ToValue
(),
endianity
);
}
// public static void WriteCarriageReturnLinefeed(this byte[] buffer, int offset)
// public static void WriteCarriageReturnLinefeed(this byte[] buffer, int offset)
// {
// {
// buffer.Write(ref offset, AsciiBytes.CarriageReturn);
// buffer.Write(ref offset, AsciiBytes.CarriageReturn);
...
...
PcapDotNet/src/PcapDotNet.Packets/IpV6/IpV6Datagram.cs
View file @
62a73ed7
This diff is collapsed.
Click to expand it.
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