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
a64c0c7f
Commit
a64c0c7f
authored
Jul 23, 2009
by
Brickner_cp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
2da3e5e9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
EthernetDatagram.cs
PcapDotNet/src/Packets/EthernetDatagram.cs
+1
-1
PacketBuilder.cs
PcapDotNet/src/Packets/PacketBuilder.cs
+3
-3
Packets.csproj
PcapDotNet/src/Packets/Packets.csproj
+2
-0
No files found.
PcapDotNet/src/Packets/EthernetDatagram.cs
View file @
a64c0c7f
...
@@ -11,7 +11,7 @@ namespace Packets
...
@@ -11,7 +11,7 @@ namespace Packets
/// </summary>
/// </summary>
public
class
EthernetDatagram
:
Datagram
public
class
EthernetDatagram
:
Datagram
{
{
private
class
Offset
private
static
class
Offset
{
{
public
const
int
Destination
=
0
;
public
const
int
Destination
=
0
;
public
const
int
Source
=
6
;
public
const
int
Source
=
6
;
...
...
PcapDotNet/src/Packets/PacketBuilder.cs
View file @
a64c0c7f
...
@@ -4,11 +4,11 @@ namespace Packets
...
@@ -4,11 +4,11 @@ namespace Packets
{
{
public
static
class
PacketBuilder
public
static
class
PacketBuilder
{
{
public
static
Packet
Ethernet
(
DateTime
timestamp
,
MacAddress
ethernetSource
,
MacAddress
ethernetDestination
,
EthernetType
ethernetType
,
Datagram
ether
en
tPayload
)
public
static
Packet
Ethernet
(
DateTime
timestamp
,
MacAddress
ethernetSource
,
MacAddress
ethernetDestination
,
EthernetType
ethernetType
,
Datagram
ether
ne
tPayload
)
{
{
byte
[]
buffer
=
new
byte
[
EthernetDatagram
.
HeaderLength
+
ether
en
tPayload
.
Length
];
byte
[]
buffer
=
new
byte
[
EthernetDatagram
.
HeaderLength
+
ether
ne
tPayload
.
Length
];
EthernetDatagram
.
WriteHeader
(
buffer
,
0
,
ethernetSource
,
ethernetDestination
,
ethernetType
);
EthernetDatagram
.
WriteHeader
(
buffer
,
0
,
ethernetSource
,
ethernetDestination
,
ethernetType
);
ether
en
tPayload
.
Write
(
buffer
,
EthernetDatagram
.
HeaderLength
);
ether
ne
tPayload
.
Write
(
buffer
,
EthernetDatagram
.
HeaderLength
);
return
new
Packet
(
buffer
,
timestamp
,
new
DataLink
(
DataLinkKind
.
Ethernet
));
return
new
Packet
(
buffer
,
timestamp
,
new
DataLink
(
DataLinkKind
.
Ethernet
));
}
}
}
}
...
...
PcapDotNet/src/Packets/Packets.csproj
View file @
a64c0c7f
...
@@ -37,6 +37,8 @@
...
@@ -37,6 +37,8 @@
<DefineConstants>
TRACE
</DefineConstants>
<DefineConstants>
TRACE
</DefineConstants>
<ErrorReport>
prompt
</ErrorReport>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
<WarningLevel>
4
</WarningLevel>
<AllowUnsafeBlocks>
true
</AllowUnsafeBlocks>
<RunCodeAnalysis>
false
</RunCodeAnalysis>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
<Reference
Include=
"System"
/>
<Reference
Include=
"System"
/>
...
...
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