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
dcd019a4
Commit
dcd019a4
authored
Aug 08, 2009
by
Brickner_cp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Documentation.
Code Analysis. Code Coverage 89.98%.
parent
430c24ac
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
263 additions
and
76 deletions
+263
-76
LivePacketDeviceTests.cs
PcapDotNet/src/PcapDotNet.Core.Test/LivePacketDeviceTests.cs
+2
-1
PacketTimestamp.h
PcapDotNet/src/PcapDotNet.Core/PacketTimestamp.h
+4
-1
IpV4Tests.cs
PcapDotNet/src/PcapDotNet.Packets.Test/IpV4Tests.cs
+72
-2
PacketTests.cs
PcapDotNet/src/PcapDotNet.Packets.Test/PacketTests.cs
+28
-0
MoreRandomPackets.cs
...Net/src/PcapDotNet.Packets.TestUtils/MoreRandomPackets.cs
+5
-4
CodeAnalysisDictionary.xml
PcapDotNet/src/PcapDotNet.Packets/CodeAnalysisDictionary.xml
+2
-0
IIpv4OptionComplexFactory.cs
.../src/PcapDotNet.Packets/IpV4/IIpv4OptionComplexFactory.cs
+18
-0
IpV4Datagram.cs
PcapDotNet/src/PcapDotNet.Packets/IpV4/IpV4Datagram.cs
+3
-0
IpV4OptionBasicSecurity.cs
...et/src/PcapDotNet.Packets/IpV4/IpV4OptionBasicSecurity.cs
+29
-22
IpV4OptionComplex.cs
PcapDotNet/src/PcapDotNet.Packets/IpV4/IpV4OptionComplex.cs
+17
-22
IpV4OptionLooseSourceRouting.cs
...c/PcapDotNet.Packets/IpV4/IpV4OptionLooseSourceRouting.cs
+7
-0
IpV4OptionQuickStart.cs
...otNet/src/PcapDotNet.Packets/IpV4/IpV4OptionQuickStart.cs
+10
-7
IpV4OptionQuickStartFunction.cs
...c/PcapDotNet.Packets/IpV4/IpV4OptionQuickStartFunction.cs
+19
-0
IpV4OptionRecordRoute.cs
...tNet/src/PcapDotNet.Packets/IpV4/IpV4OptionRecordRoute.cs
+7
-0
IpV4OptionRouterAlert.cs
...tNet/src/PcapDotNet.Packets/IpV4/IpV4OptionRouterAlert.cs
+7
-0
IpV4OptionSecurityClassificationLevel.cs
...Net.Packets/IpV4/IpV4OptionSecurityClassificationLevel.cs
+5
-0
IpV4OptionSecurityProtectionAuthorities.cs
...t.Packets/IpV4/IpV4OptionSecurityProtectionAuthorities.cs
+2
-2
IpV4OptionStreamIdentifier.cs
...src/PcapDotNet.Packets/IpV4/IpV4OptionStreamIdentifier.cs
+7
-0
IpV4OptionStrictSourceRouting.cs
.../PcapDotNet.Packets/IpV4/IpV4OptionStrictSourceRouting.cs
+7
-0
IpV4OptionTraceRoute.cs
...otNet/src/PcapDotNet.Packets/IpV4/IpV4OptionTraceRoute.cs
+8
-1
MoreByteArray.cs
PcapDotNet/src/PcapDotNet.Packets/MoreByteArray.cs
+0
-12
PcapDotNet.Packets.csproj
PcapDotNet/src/PcapDotNet.Packets/PcapDotNet.Packets.csproj
+4
-2
No files found.
PcapDotNet/src/PcapDotNet.Core.Test/LivePacketDeviceTests.cs
View file @
dcd019a4
...
@@ -727,7 +727,8 @@ namespace PcapDotNet.Core.Test
...
@@ -727,7 +727,8 @@ namespace PcapDotNet.Core.Test
try
try
{
{
PacketTotalStatistics
totalStatistics
=
communicator
.
TotalStatistics
;
PacketTotalStatistics
totalStatistics
=
communicator
.
TotalStatistics
;
Assert
.
AreEqual
(
totalStatistics
,
totalStatistics
);
Assert
.
AreEqual
<
object
>(
totalStatistics
,
totalStatistics
);
Assert
.
AreNotEqual
(
null
,
totalStatistics
);
Assert
.
AreEqual
(
totalStatistics
.
GetHashCode
(),
totalStatistics
.
GetHashCode
());
Assert
.
AreEqual
(
totalStatistics
.
GetHashCode
(),
totalStatistics
.
GetHashCode
());
Assert
.
IsTrue
(
totalStatistics
.
Equals
(
totalStatistics
));
Assert
.
IsTrue
(
totalStatistics
.
Equals
(
totalStatistics
));
Assert
.
AreNotEqual
(
null
,
totalStatistics
);
Assert
.
AreNotEqual
(
null
,
totalStatistics
);
...
...
PcapDotNet/src/PcapDotNet.Core/PacketTimestamp.h
View file @
dcd019a4
...
@@ -29,9 +29,12 @@ namespace PcapDotNet { namespace Core
...
@@ -29,9 +29,12 @@ namespace PcapDotNet { namespace Core
private
:
private
:
static
PacketTimestamp
()
{
Initialize
();
}
static
PacketTimestamp
()
{
Initialize
();
}
PacketTimestamp
(){}
static
void
Initialize
();
static
void
Initialize
();
[
System
::
Diagnostics
::
DebuggerNonUserCode
]
PacketTimestamp
(){}
static
System
::
DateTime
_minimumPacketTimestamp
;
static
System
::
DateTime
_minimumPacketTimestamp
;
static
System
::
DateTime
_maximumPacketTimestamp
;
static
System
::
DateTime
_maximumPacketTimestamp
;
};
};
...
...
PcapDotNet/src/PcapDotNet.Packets.Test/IpV4Tests.cs
View file @
dcd019a4
...
@@ -238,8 +238,9 @@ namespace PcapDotNet.Packets.Test
...
@@ -238,8 +238,9 @@ namespace PcapDotNet.Packets.Test
TimeSpan
timeOfDay
=
new
TimeSpan
(
1
,
2
,
3
);
TimeSpan
timeOfDay
=
new
TimeSpan
(
1
,
2
,
3
);
IpV4OptionTimeOfDay
timeSinceMidnight
=
new
IpV4OptionTimeOfDay
(
timeOfDay
);
IpV4OptionTimeOfDay
timeSinceMidnight
=
new
IpV4OptionTimeOfDay
(
timeOfDay
);
Assert
.
AreEqual
(
timeOfDay
,
timeSinceMidnight
.
TimeSinceMidnightUniversalTime
);
Assert
.
AreEqual
(
timeOfDay
,
timeSinceMidnight
.
TimeSinceMidnightUniversalTime
);
Assert
.
IsTrue
(
timeOfDay
==
timeSinceMidnight
.
TimeSinceMidnightUniversalTime
);
Assert
.
AreEqual
<
object
>(
timeSinceMidnight
,
timeSinceMidnight
);
Assert
.
IsFalse
(
timeOfDay
!=
timeSinceMidnight
.
TimeSinceMidnightUniversalTime
);
Assert
.
IsTrue
(
timeSinceMidnight
==
timeSinceMidnight
);
Assert
.
IsFalse
(
timeSinceMidnight
!=
timeSinceMidnight
);
}
}
[
TestMethod
]
[
TestMethod
]
...
@@ -251,7 +252,76 @@ namespace PcapDotNet.Packets.Test
...
@@ -251,7 +252,76 @@ namespace PcapDotNet.Packets.Test
Assert
.
AreEqual
(
timedAddress1
,
timedAddress2
);
Assert
.
AreEqual
(
timedAddress1
,
timedAddress2
);
Assert
.
IsTrue
(
timedAddress1
==
timedAddress2
);
Assert
.
IsTrue
(
timedAddress1
==
timedAddress2
);
Assert
.
IsFalse
(
timedAddress1
!=
timedAddress2
);
Assert
.
IsFalse
(
timedAddress1
!=
timedAddress2
);
}
[
TestMethod
]
[
ExpectedException
(
typeof
(
ArgumentOutOfRangeException
))]
public
void
IpV4OptionBasicSecurtiyBadLengthTest
()
{
IpV4OptionBasicSecurity
option
=
new
IpV4OptionBasicSecurity
(
IpV4OptionSecurityClassificationLevel
.
Secret
,
IpV4OptionSecurityProtectionAuthorities
.
None
,
1
);
Assert
.
IsNotNull
(
option
);
Assert
.
Fail
();
}
[
TestMethod
]
[
ExpectedException
(
typeof
(
ArgumentException
))]
public
void
IpV4OptionBasicSecurtiyNoProtectionAuthoritiesButWithValueTest
()
{
IpV4OptionBasicSecurity
option
=
new
IpV4OptionBasicSecurity
(
IpV4OptionSecurityClassificationLevel
.
Secret
,
IpV4OptionSecurityProtectionAuthorities
.
Nsa
,
3
);
Assert
.
IsNotNull
(
option
);
Assert
.
Fail
();
}
[
TestMethod
]
[
ExpectedException
(
typeof
(
ArgumentException
))]
public
void
IpV4OptionQuickStartBadFunctionTest
()
{
IpV4OptionQuickStart
option
=
new
IpV4OptionQuickStart
((
IpV4OptionQuickStartFunction
)
2
,
1
,
2
,
16
);
Assert
.
IsNotNull
(
option
);
Assert
.
Fail
();
}
[
TestMethod
]
[
ExpectedException
(
typeof
(
ArgumentOutOfRangeException
))]
public
void
IpV4OptionQuickStartBadRateTest
()
{
IpV4OptionQuickStart
option
=
new
IpV4OptionQuickStart
(
IpV4OptionQuickStartFunction
.
RateRequest
,
100
,
1
,
32
);
Assert
.
IsNotNull
(
option
);
Assert
.
Fail
();
}
[
TestMethod
]
[
ExpectedException
(
typeof
(
ArgumentException
))]
public
void
IpV4OptionQuickStartBadNonceTest
()
{
IpV4OptionQuickStart
option
=
new
IpV4OptionQuickStart
(
IpV4OptionQuickStartFunction
.
RateRequest
,
1
,
1
,
2
);
Assert
.
IsNotNull
(
option
);
Assert
.
Fail
();
}
[
TestMethod
]
[
ExpectedException
(
typeof
(
ArgumentException
))]
public
void
IpV4OptionTimestampAndAddressBadTypeTest
()
{
IpV4OptionTimestampAndAddress
option
=
new
IpV4OptionTimestampAndAddress
((
IpV4OptionTimestampType
)
166
,
1
,
2
);
Assert
.
IsNotNull
(
option
);
Assert
.
Fail
();
}
[
TestMethod
]
public
void
IpV4DatagramInvalidShortTest
()
{
Packet
packet
=
PacketBuilder
.
EthernetIpV4
(
DateTime
.
Now
,
new
MacAddress
(
1
),
new
MacAddress
(
2
),
0
,
1
,
new
IpV4Fragmentation
(
IpV4FragmentationOptions
.
MoreFragments
,
8
),
1
,
IpV4Protocol
.
WidebandExpak
,
new
IpV4Address
(
1
),
new
IpV4Address
(
2
),
new
IpV4Options
(),
Datagram
.
Empty
);
Assert
.
IsTrue
(
packet
.
IsValid
);
byte
[]
badPacketBuffer
=
new
byte
[
packet
.
Length
-
5
];
packet
.
Buffer
.
BlockCopy
(
0
,
badPacketBuffer
,
0
,
badPacketBuffer
.
Length
);
Packet
badPacket
=
new
Packet
(
badPacketBuffer
,
DateTime
.
Now
,
packet
.
DataLink
);
Assert
.
IsFalse
(
badPacket
.
IsValid
,
"badPacket.IsValid"
);
}
}
private
static
Packet
HexToPacket
(
string
hexString
,
DataLinkKind
dataLinkKind
)
private
static
Packet
HexToPacket
(
string
hexString
,
DataLinkKind
dataLinkKind
)
...
...
PcapDotNet/src/PcapDotNet.Packets.Test/PacketTests.cs
View file @
dcd019a4
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Reflection
;
using
Microsoft.VisualStudio.TestTools.UnitTesting
;
using
Microsoft.VisualStudio.TestTools.UnitTesting
;
using
PcapDotNet.Packets.TestUtils
;
using
PcapDotNet.Packets.TestUtils
;
...
@@ -103,9 +104,36 @@ namespace PcapDotNet.Packets.Test
...
@@ -103,9 +104,36 @@ namespace PcapDotNet.Packets.Test
Assert
.
AreEqual
(
buffer
.
Length
,
packet
.
Count
);
Assert
.
AreEqual
(
buffer
.
Length
,
packet
.
Count
);
Assert
.
AreEqual
(
buffer
[
2
],
packet
[
2
]);
Assert
.
AreEqual
(
buffer
[
2
],
packet
[
2
]);
Assert
.
IsTrue
(
packet
.
IsReadOnly
);
Assert
.
IsTrue
(
packet
.
IsReadOnly
);
}
[
TestMethod
]
public
void
MutationMethodsTest
()
{
string
[]
methodNames
=
new
[]
{
"Add"
,
"Clear"
,
"Insert"
,
"Remove"
,
"RemoveAt"
,
"set_Item"
};
Packet
packet
=
new
Random
().
NextPacket
(
100
);
var
methods
=
from
method
in
typeof
(
Packet
).
GetMethods
()
where
(
methodNames
.
Contains
(
method
.
Name
))
select
method
;
Assert
.
AreEqual
(
methodNames
.
Length
,
methods
.
Count
());
foreach
(
var
method
in
methods
)
{
var
parameters
=
from
parameter
in
method
.
GetParameters
()
select
Activator
.
CreateInstance
(
parameter
.
ParameterType
);
try
{
method
.
Invoke
(
packet
,
parameters
.
ToArray
());
}
catch
(
TargetInvocationException
e
)
{
Assert
.
IsInstanceOfType
(
e
.
InnerException
,
typeof
(
InvalidOperationException
));
continue
;
}
Assert
.
Fail
();
}
}
}
}
}
}
}
\ No newline at end of file
PcapDotNet/src/PcapDotNet.Packets.TestUtils/MoreRandomPackets.cs
View file @
dcd019a4
...
@@ -118,13 +118,14 @@ namespace PcapDotNet.Packets.TestUtils
...
@@ -118,13 +118,14 @@ namespace PcapDotNet.Packets.TestUtils
return
IpV4Option
.
Nop
;
return
IpV4Option
.
Nop
;
case
IpV4OptionType
.
BasicSecurity
:
case
IpV4OptionType
.
BasicSecurity
:
IpV4OptionSecurityProtectionAuthorit
y
protectionAuthority
=
IpV4OptionSecurityProtectionAuthority
.
None
;
IpV4OptionSecurityProtectionAuthorit
ies
protectionAuthorities
=
IpV4OptionSecurityProtectionAuthorities
.
None
;
int
protectionAuthorityLength
=
random
.
Next
(
maximumOptionLength
-
IpV4OptionBasicSecurity
.
OptionMinimumLength
);
int
protectionAuthorityLength
=
random
.
Next
(
maximumOptionLength
-
IpV4OptionBasicSecurity
.
OptionMinimumLength
);
if
(
protectionAuthorityLength
>
0
)
if
(
protectionAuthorityLength
>
0
)
protectionAuthorit
y
=
random
.
NextEnum
<
IpV4OptionSecurityProtectionAuthority
>();
protectionAuthorit
ies
=
random
.
NextEnum
<
IpV4OptionSecurityProtectionAuthorities
>();
return
new
IpV4OptionBasicSecurity
(
random
.
NextEnum
<
IpV4OptionSecurityClassificationLevel
>(),
protectionAuthority
,
return
new
IpV4OptionBasicSecurity
(
random
.
NextEnum
(
IpV4OptionSecurityClassificationLevel
.
None
),
(
byte
)(
IpV4OptionBasicSecurity
.
OptionMinimumLength
+
protectionAuthorityLength
));
protectionAuthorities
,
(
byte
)(
IpV4OptionBasicSecurity
.
OptionMinimumLength
+
protectionAuthorityLength
));
case
IpV4OptionType
.
LooseSourceRouting
:
case
IpV4OptionType
.
LooseSourceRouting
:
case
IpV4OptionType
.
StrictSourceRouting
:
case
IpV4OptionType
.
StrictSourceRouting
:
...
...
PcapDotNet/src/PcapDotNet.Packets/CodeAnalysisDictionary.xml
View file @
dcd019a4
...
@@ -35,6 +35,8 @@
...
@@ -35,6 +35,8 @@
<Word>
multiprotocol
</Word>
<Word>
multiprotocol
</Word>
<Word>
avb
</Word>
<Word>
avb
</Word>
<Word>
unicast
</Word>
<Word>
unicast
</Word>
<Word>
genser
</Word>
<Word>
nsa
</Word>
</Recognized>
</Recognized>
<Deprecated>
<Deprecated>
<!--Term PreferredAlternate="EnterpriseServices">complus</Term-->
<!--Term PreferredAlternate="EnterpriseServices">complus</Term-->
...
...
PcapDotNet/src/PcapDotNet.Packets/IpV4/IIpv4OptionComplexFactory.cs
0 → 100644
View file @
dcd019a4
namespace
PcapDotNet.Packets.IpV4
{
/// <summary>
/// This interface is used to create all complex options.
/// Every complex option should implement such a factory to create itself from a buffer.
/// </summary>
internal
interface
IIpv4OptionComplexFactory
{
/// <summary>
/// Tries to read the option from a buffer starting from the option value (after the type and length).
/// </summary>
/// <param name="buffer">The buffer to read the option from.</param>
/// <param name="offset">The offset to the first byte to read the buffer. Will be incremented by the number of bytes read.</param>
/// <param name="valueLength">The number of bytes the option value should take according to the length field that was already read.</param>
/// <returns>On success - the complex option read. On failure - null.</returns>
IpV4OptionComplex
CreateInstance
(
byte
[]
buffer
,
ref
int
offset
,
byte
valueLength
);
}
}
\ No newline at end of file
PcapDotNet/src/PcapDotNet.Packets/IpV4/IpV4Datagram.cs
View file @
dcd019a4
...
@@ -76,6 +76,9 @@ namespace PcapDotNet.Packets.IpV4
...
@@ -76,6 +76,9 @@ namespace PcapDotNet.Packets.IpV4
get
{
return
(
this
[
Offset
.
VersionAndHeaderLength
]
&
0x0F
)
*
4
;
}
get
{
return
(
this
[
Offset
.
VersionAndHeaderLength
]
&
0x0F
)
*
4
;
}
}
}
/// <summary>
/// The real number of bytes in the header (different than HeaderLength when the datagram is too small).
/// </summary>
public
int
RealHeaderLength
public
int
RealHeaderLength
{
{
get
{
return
Math
.
Min
(
HeaderLength
,
Length
);
}
get
{
return
Math
.
Min
(
HeaderLength
,
Length
);
}
...
...
PcapDotNet/src/PcapDotNet.Packets/IpV4/IpV4OptionBasicSecurity.cs
View file @
dcd019a4
...
@@ -51,27 +51,27 @@ namespace PcapDotNet.Packets.IpV4
...
@@ -51,27 +51,27 @@ namespace PcapDotNet.Packets.IpV4
/// This field specifies the (U.S.) classification level at which the datagram must be protected.
/// This field specifies the (U.S.) classification level at which the datagram must be protected.
/// The information in the datagram must be protected at this level.
/// The information in the datagram must be protected at this level.
/// </param>
/// </param>
/// <param name="protectionAuthorit
y
">
/// <param name="protectionAuthorit
ies
">
/// This field identifies the National Access Programs or Special Access Programs
/// This field identifies the National Access Programs or Special Access Programs
/// which specify protection rules for transmission and processing of the information contained in the datagram.
/// which specify protection rules for transmission and processing of the information contained in the datagram.
/// </param>
/// </param>
/// <param name="length">
/// <param name="length">
/// The number of bytes this option will take.
/// The number of bytes this option will take.
/// </param>
/// </param>
public
IpV4OptionBasicSecurity
(
IpV4OptionSecurityClassificationLevel
classificationLevel
,
IpV4OptionSecurityProtectionAuthorit
y
protectionAuthority
,
byte
length
)
public
IpV4OptionBasicSecurity
(
IpV4OptionSecurityClassificationLevel
classificationLevel
,
IpV4OptionSecurityProtectionAuthorit
ies
protectionAuthorities
,
byte
length
)
:
base
(
IpV4OptionType
.
BasicSecurity
)
:
base
(
IpV4OptionType
.
BasicSecurity
)
{
{
if
(
length
<
OptionMinimumLength
)
if
(
length
<
OptionMinimumLength
)
throw
new
ArgumentOutOfRangeException
(
"length"
,
length
,
"Minimum option length is "
+
OptionMinimumLength
);
throw
new
ArgumentOutOfRangeException
(
"length"
,
length
,
"Minimum option length is "
+
OptionMinimumLength
);
if
(
length
==
OptionMinimumLength
&&
protectionAuthorit
y
!=
IpV4OptionSecurityProtectionAuthority
.
None
)
if
(
length
==
OptionMinimumLength
&&
protectionAuthorit
ies
!=
IpV4OptionSecurityProtectionAuthorities
.
None
)
{
{
throw
new
ArgumentException
(
"Can't have a protection authority without minimum of "
+
OptionValueMinimumLength
+
1
+
" length"
,
throw
new
ArgumentException
(
"Can't have a protection authority without minimum of "
+
(
OptionValueMinimumLength
+
1
)
+
" length"
,
"protectionAuthorit
y
"
);
"protectionAuthorit
ies
"
);
}
}
_classificationLevel
=
classificationLevel
;
_classificationLevel
=
classificationLevel
;
_protectionAuthorit
y
=
protectionAuthority
;
_protectionAuthorit
ies
=
protectionAuthorities
;
_length
=
length
;
_length
=
length
;
}
}
...
@@ -83,7 +83,7 @@ namespace PcapDotNet.Packets.IpV4
...
@@ -83,7 +83,7 @@ namespace PcapDotNet.Packets.IpV4
/// The information in the datagram must be protected at this level.
/// The information in the datagram must be protected at this level.
/// </param>
/// </param>
public
IpV4OptionBasicSecurity
(
IpV4OptionSecurityClassificationLevel
classificationLevel
)
public
IpV4OptionBasicSecurity
(
IpV4OptionSecurityClassificationLevel
classificationLevel
)
:
this
(
classificationLevel
,
IpV4OptionSecurityProtectionAuthorit
y
.
None
,
OptionMinimumLength
)
:
this
(
classificationLevel
,
IpV4OptionSecurityProtectionAuthorit
ies
.
None
,
OptionMinimumLength
)
{
{
}
}
...
@@ -108,9 +108,9 @@ namespace PcapDotNet.Packets.IpV4
...
@@ -108,9 +108,9 @@ namespace PcapDotNet.Packets.IpV4
/// This field identifies the National Access Programs or Special Access Programs
/// This field identifies the National Access Programs or Special Access Programs
/// which specify protection rules for transmission and processing of the information contained in the datagram.
/// which specify protection rules for transmission and processing of the information contained in the datagram.
/// </summary>
/// </summary>
public
IpV4OptionSecurityProtectionAuthorit
y
ProtectionAuthority
public
IpV4OptionSecurityProtectionAuthorit
ies
ProtectionAuthorities
{
{
get
{
return
_protectionAuthorit
y
;
}
get
{
return
_protectionAuthorit
ies
;
}
}
}
...
@@ -139,7 +139,7 @@ namespace PcapDotNet.Packets.IpV4
...
@@ -139,7 +139,7 @@ namespace PcapDotNet.Packets.IpV4
return
false
;
return
false
;
return
ClassificationLevel
==
other
.
ClassificationLevel
&&
return
ClassificationLevel
==
other
.
ClassificationLevel
&&
ProtectionAuthorit
y
==
other
.
ProtectionAuthority
&&
ProtectionAuthorit
ies
==
other
.
ProtectionAuthorities
&&
Length
==
other
.
Length
;
Length
==
other
.
Length
;
}
}
...
@@ -159,9 +159,16 @@ namespace PcapDotNet.Packets.IpV4
...
@@ -159,9 +159,16 @@ namespace PcapDotNet.Packets.IpV4
public
override
int
GetHashCode
()
public
override
int
GetHashCode
()
{
{
return
base
.
GetHashCode
()
^
return
base
.
GetHashCode
()
^
((((
byte
)
ClassificationLevel
)
<<
16
)
|
(((
byte
)
ProtectionAuthorit
y
)
<<
8
)
|
Length
).
GetHashCode
();
((((
byte
)
ClassificationLevel
)
<<
16
)
|
(((
byte
)
ProtectionAuthorit
ies
)
<<
8
)
|
Length
).
GetHashCode
();
}
}
/// <summary>
/// Tries to read the option from a buffer starting from the option value (after the type and length).
/// </summary>
/// <param name="buffer">The buffer to read the option from.</param>
/// <param name="offset">The offset to the first byte to read the buffer. Will be incremented by the number of bytes read.</param>
/// <param name="valueLength">The number of bytes the option value should take according to the length field that was already read.</param>
/// <returns>On success - the complex option read. On failure - null.</returns>
public
IpV4OptionComplex
CreateInstance
(
byte
[]
buffer
,
ref
int
offset
,
byte
valueLength
)
public
IpV4OptionComplex
CreateInstance
(
byte
[]
buffer
,
ref
int
offset
,
byte
valueLength
)
{
{
if
(
valueLength
<
OptionValueMinimumLength
)
if
(
valueLength
<
OptionValueMinimumLength
)
...
@@ -177,24 +184,24 @@ namespace PcapDotNet.Packets.IpV4
...
@@ -177,24 +184,24 @@ namespace PcapDotNet.Packets.IpV4
return
null
;
return
null
;
}
}
// Protection authorit
y
// Protection authorit
ies
int
protectionAuthorit
y
Length
=
valueLength
-
OptionValueMinimumLength
;
int
protectionAuthorit
ies
Length
=
valueLength
-
OptionValueMinimumLength
;
IpV4OptionSecurityProtectionAuthorit
y
protectionAuthority
=
IpV4OptionSecurityProtectionAuthority
.
None
;
IpV4OptionSecurityProtectionAuthorit
ies
protectionAuthorities
=
IpV4OptionSecurityProtectionAuthorities
.
None
;
if
(
protectionAuthorit
y
Length
>
0
)
if
(
protectionAuthorit
ies
Length
>
0
)
{
{
for
(
int
i
=
0
;
i
<
protectionAuthorit
y
Length
-
1
;
++
i
)
for
(
int
i
=
0
;
i
<
protectionAuthorit
ies
Length
-
1
;
++
i
)
{
{
if
((
buffer
[
offset
+
i
]
&
0x01
)
==
0
)
if
((
buffer
[
offset
+
i
]
&
0x01
)
==
0
)
return
null
;
return
null
;
}
}
if
((
buffer
[
offset
+
protectionAuthorit
y
Length
-
1
]
&
0x01
)
!=
0
)
if
((
buffer
[
offset
+
protectionAuthorit
ies
Length
-
1
]
&
0x01
)
!=
0
)
return
null
;
return
null
;
protectionAuthorit
y
=
(
IpV4OptionSecurityProtectionAuthority
)(
buffer
[
offset
]
&
0xFE
);
protectionAuthorit
ies
=
(
IpV4OptionSecurityProtectionAuthorities
)(
buffer
[
offset
]
&
0xFE
);
}
}
offset
+=
protectionAuthorit
y
Length
;
offset
+=
protectionAuthorit
ies
Length
;
return
new
IpV4OptionBasicSecurity
(
classificationLevel
,
protectionAuthorit
y
,
(
byte
)(
OptionMinimumLength
+
protectionAuthority
Length
));
return
new
IpV4OptionBasicSecurity
(
classificationLevel
,
protectionAuthorit
ies
,
(
byte
)(
OptionMinimumLength
+
protectionAuthorities
Length
));
}
}
internal
override
void
Write
(
byte
[]
buffer
,
ref
int
offset
)
internal
override
void
Write
(
byte
[]
buffer
,
ref
int
offset
)
...
@@ -205,7 +212,7 @@ namespace PcapDotNet.Packets.IpV4
...
@@ -205,7 +212,7 @@ namespace PcapDotNet.Packets.IpV4
int
protectionAuthorityLength
=
Length
-
OptionMinimumLength
;
int
protectionAuthorityLength
=
Length
-
OptionMinimumLength
;
if
(
protectionAuthorityLength
>
0
)
if
(
protectionAuthorityLength
>
0
)
{
{
buffer
[
offset
++]
=
(
byte
)
ProtectionAuthorit
y
;
buffer
[
offset
++]
=
(
byte
)
ProtectionAuthorit
ies
;
if
(
protectionAuthorityLength
>
1
)
if
(
protectionAuthorityLength
>
1
)
{
{
buffer
[
offset
-
1
]
|=
0x01
;
buffer
[
offset
-
1
]
|=
0x01
;
...
@@ -217,7 +224,7 @@ namespace PcapDotNet.Packets.IpV4
...
@@ -217,7 +224,7 @@ namespace PcapDotNet.Packets.IpV4
}
}
private
readonly
IpV4OptionSecurityClassificationLevel
_classificationLevel
;
private
readonly
IpV4OptionSecurityClassificationLevel
_classificationLevel
;
private
readonly
IpV4OptionSecurityProtectionAuthorit
y
_protectionAuthority
;
private
readonly
IpV4OptionSecurityProtectionAuthorit
ies
_protectionAuthorities
;
private
readonly
byte
_length
;
private
readonly
byte
_length
;
}
}
}
}
\ No newline at end of file
PcapDotNet/src/PcapDotNet.Packets/IpV4/IpV4OptionComplex.cs
View file @
dcd019a4
...
@@ -5,38 +5,18 @@ using System.Reflection;
...
@@ -5,38 +5,18 @@ using System.Reflection;
namespace
PcapDotNet.Packets.IpV4
namespace
PcapDotNet.Packets.IpV4
{
{
internal
interface
IIpv4OptionComplexFactory
{
IpV4OptionComplex
CreateInstance
(
byte
[]
buffer
,
ref
int
offset
,
byte
valueLength
);
}
/// <summary>
/// <summary>
/// Represents a complex IPv4 option.
/// Represents a complex IPv4 option.
/// Complex option means that it contains data and not just the type.
/// Complex option means that it contains data and not just the type.
/// </summary>
/// </summary>
public
abstract
class
IpV4OptionComplex
:
IpV4Option
public
abstract
class
IpV4OptionComplex
:
IpV4Option
{
{
static
IpV4OptionComplex
()
{
var
complexOptions
=
from
type
in
Assembly
.
GetExecutingAssembly
().
GetTypes
()
where
typeof
(
IIpv4OptionComplexFactory
).
IsAssignableFrom
(
type
)
&&
GetRegistrationAttribute
(
type
)
!=
null
select
new
{
GetRegistrationAttribute
(
type
).
OptionType
,
Option
=
(
IIpv4OptionComplexFactory
)
Activator
.
CreateInstance
(
type
)
};
_complexOptions
=
complexOptions
.
ToDictionary
(
option
=>
option
.
OptionType
,
option
=>
option
.
Option
);
}
/// <summary>
/// <summary>
/// The header length in bytes for the option (type and size).
/// The header length in bytes for the option (type and size).
/// </summary>
/// </summary>
public
const
int
OptionHeaderLength
=
2
;
public
const
int
OptionHeaderLength
=
2
;
internal
class
IpV4OptionTypeRegistrationAttribute
:
Attribute
internal
sealed
class
IpV4OptionTypeRegistrationAttribute
:
Attribute
{
{
public
IpV4OptionTypeRegistrationAttribute
(
IpV4OptionType
optionType
)
public
IpV4OptionTypeRegistrationAttribute
(
IpV4OptionType
optionType
)
{
{
...
@@ -76,6 +56,21 @@ namespace PcapDotNet.Packets.IpV4
...
@@ -76,6 +56,21 @@ namespace PcapDotNet.Packets.IpV4
{
{
}
}
private
static
Dictionary
<
IpV4OptionType
,
IIpv4OptionComplexFactory
>
InitializeComplexOptions
()
{
var
complexOptions
=
from
type
in
Assembly
.
GetExecutingAssembly
().
GetTypes
()
where
typeof
(
IIpv4OptionComplexFactory
).
IsAssignableFrom
(
type
)
&&
GetRegistrationAttribute
(
type
)
!=
null
select
new
{
GetRegistrationAttribute
(
type
).
OptionType
,
Option
=
(
IIpv4OptionComplexFactory
)
Activator
.
CreateInstance
(
type
)
};
return
complexOptions
.
ToDictionary
(
option
=>
option
.
OptionType
,
option
=>
option
.
Option
);
}
private
static
IpV4OptionTypeRegistrationAttribute
GetRegistrationAttribute
(
Type
type
)
private
static
IpV4OptionTypeRegistrationAttribute
GetRegistrationAttribute
(
Type
type
)
{
{
var
registraionAttributes
=
type
.
GetCustomAttributes
(
typeof
(
IpV4OptionTypeRegistrationAttribute
),
false
);
var
registraionAttributes
=
type
.
GetCustomAttributes
(
typeof
(
IpV4OptionTypeRegistrationAttribute
),
false
);
...
@@ -85,6 +80,6 @@ namespace PcapDotNet.Packets.IpV4
...
@@ -85,6 +80,6 @@ namespace PcapDotNet.Packets.IpV4
return
((
IpV4OptionTypeRegistrationAttribute
)
registraionAttributes
[
0
]);
return
((
IpV4OptionTypeRegistrationAttribute
)
registraionAttributes
[
0
]);
}
}
private
static
readonly
Dictionary
<
IpV4OptionType
,
IIpv4OptionComplexFactory
>
_complexOptions
;
private
static
readonly
Dictionary
<
IpV4OptionType
,
IIpv4OptionComplexFactory
>
_complexOptions
=
InitializeComplexOptions
()
;
}
}
}
}
\ No newline at end of file
PcapDotNet/src/PcapDotNet.Packets/IpV4/IpV4OptionLooseSourceRouting.cs
View file @
dcd019a4
...
@@ -63,6 +63,13 @@ namespace PcapDotNet.Packets.IpV4
...
@@ -63,6 +63,13 @@ namespace PcapDotNet.Packets.IpV4
{
{
}
}
/// <summary>
/// Tries to read the option from a buffer starting from the option value (after the type and length).
/// </summary>
/// <param name="buffer">The buffer to read the option from.</param>
/// <param name="offset">The offset to the first byte to read the buffer. Will be incremented by the number of bytes read.</param>
/// <param name="valueLength">The number of bytes the option value should take according to the length field that was already read.</param>
/// <returns>On success - the complex option read. On failure - null.</returns>
public
IpV4OptionComplex
CreateInstance
(
byte
[]
buffer
,
ref
int
offset
,
byte
valueLength
)
public
IpV4OptionComplex
CreateInstance
(
byte
[]
buffer
,
ref
int
offset
,
byte
valueLength
)
{
{
IpV4Address
[]
addresses
;
IpV4Address
[]
addresses
;
...
...
PcapDotNet/src/PcapDotNet.Packets/IpV4/IpV4OptionQuickStart.cs
View file @
dcd019a4
...
@@ -2,13 +2,6 @@ using System;
...
@@ -2,13 +2,6 @@ using System;
namespace
PcapDotNet.Packets.IpV4
namespace
PcapDotNet.Packets.IpV4
{
{
public
enum
IpV4OptionQuickStartFunction
:
byte
{
RateRequest
=
0x00
,
RateReport
=
0x80
}
/// <summary>
/// <summary>
/// The Quick-Start Option for IPv4
/// The Quick-Start Option for IPv4
///
///
...
@@ -35,6 +28,9 @@ namespace PcapDotNet.Packets.IpV4
...
@@ -35,6 +28,9 @@ namespace PcapDotNet.Packets.IpV4
/// </summary>
/// </summary>
public
const
int
OptionValueLength
=
OptionLength
-
OptionHeaderLength
;
public
const
int
OptionValueLength
=
OptionLength
-
OptionHeaderLength
;
/// <summary>
/// The maximum value for the rate field.
/// </summary>
public
const
byte
RateMaximumValue
=
0x0F
;
public
const
byte
RateMaximumValue
=
0x0F
;
/// <summary>
/// <summary>
...
@@ -217,6 +213,13 @@ namespace PcapDotNet.Packets.IpV4
...
@@ -217,6 +213,13 @@ namespace PcapDotNet.Packets.IpV4
Nonce
.
GetHashCode
();
Nonce
.
GetHashCode
();
}
}
/// <summary>
/// Tries to read the option from a buffer starting from the option value (after the type and length).
/// </summary>
/// <param name="buffer">The buffer to read the option from.</param>
/// <param name="offset">The offset to the first byte to read the buffer. Will be incremented by the number of bytes read.</param>
/// <param name="valueLength">The number of bytes the option value should take according to the length field that was already read.</param>
/// <returns>On success - the complex option read. On failure - null.</returns>
public
IpV4OptionComplex
CreateInstance
(
byte
[]
buffer
,
ref
int
offset
,
byte
valueLength
)
public
IpV4OptionComplex
CreateInstance
(
byte
[]
buffer
,
ref
int
offset
,
byte
valueLength
)
{
{
if
(
valueLength
!=
OptionValueLength
)
if
(
valueLength
!=
OptionValueLength
)
...
...
PcapDotNet/src/PcapDotNet.Packets/IpV4/IpV4OptionQuickStartFunction.cs
0 → 100644
View file @
dcd019a4
namespace
PcapDotNet.Packets.IpV4
{
/// <summary>
/// Defines the possible quick start functions.
/// </summary>
public
enum
IpV4OptionQuickStartFunction
:
byte
{
/// <summary>
/// Request for a specific rate.
/// </summary>
RateRequest
=
0x00
,
/// <summary>
/// Reports on a specific rate that was agreed (or disagreed).
/// </summary>
RateReport
=
0x80
}
}
\ No newline at end of file
PcapDotNet/src/PcapDotNet.Packets/IpV4/IpV4OptionRecordRoute.cs
View file @
dcd019a4
...
@@ -70,6 +70,13 @@ namespace PcapDotNet.Packets.IpV4
...
@@ -70,6 +70,13 @@ namespace PcapDotNet.Packets.IpV4
{
{
}
}
/// <summary>
/// Tries to read the option from a buffer starting from the option value (after the type and length).
/// </summary>
/// <param name="buffer">The buffer to read the option from.</param>
/// <param name="offset">The offset to the first byte to read the buffer. Will be incremented by the number of bytes read.</param>
/// <param name="valueLength">The number of bytes the option value should take according to the length field that was already read.</param>
/// <returns>On success - the complex option read. On failure - null.</returns>
public
IpV4OptionComplex
CreateInstance
(
byte
[]
buffer
,
ref
int
offset
,
byte
valueLength
)
public
IpV4OptionComplex
CreateInstance
(
byte
[]
buffer
,
ref
int
offset
,
byte
valueLength
)
{
{
IpV4Address
[]
addresses
;
IpV4Address
[]
addresses
;
...
...
PcapDotNet/src/PcapDotNet.Packets/IpV4/IpV4OptionRouterAlert.cs
View file @
dcd019a4
...
@@ -104,6 +104,13 @@ namespace PcapDotNet.Packets.IpV4
...
@@ -104,6 +104,13 @@ namespace PcapDotNet.Packets.IpV4
Value
.
GetHashCode
();
Value
.
GetHashCode
();
}
}
/// <summary>
/// Tries to read the option from a buffer starting from the option value (after the type and length).
/// </summary>
/// <param name="buffer">The buffer to read the option from.</param>
/// <param name="offset">The offset to the first byte to read the buffer. Will be incremented by the number of bytes read.</param>
/// <param name="valueLength">The number of bytes the option value should take according to the length field that was already read.</param>
/// <returns>On success - the complex option read. On failure - null.</returns>
public
IpV4OptionComplex
CreateInstance
(
byte
[]
buffer
,
ref
int
offset
,
byte
valueLength
)
public
IpV4OptionComplex
CreateInstance
(
byte
[]
buffer
,
ref
int
offset
,
byte
valueLength
)
{
{
if
(
valueLength
!=
OptionHeaderLength
)
if
(
valueLength
!=
OptionHeaderLength
)
...
...
PcapDotNet/src/PcapDotNet.Packets/IpV4/IpV4OptionSecurityClassificationLevel.cs
View file @
dcd019a4
...
@@ -9,6 +9,11 @@ namespace PcapDotNet.Packets.IpV4
...
@@ -9,6 +9,11 @@ namespace PcapDotNet.Packets.IpV4
/// </summary>
/// </summary>
public
enum
IpV4OptionSecurityClassificationLevel
:
byte
public
enum
IpV4OptionSecurityClassificationLevel
:
byte
{
{
/// <summary>
/// An invalid value for a classification level.
/// </summary>
None
,
/// <summary>
/// <summary>
/// Top Secret
/// Top Secret
/// </summary>
/// </summary>
...
...
PcapDotNet/src/PcapDotNet.Packets/IpV4/IpV4OptionSecurityProtectionAuthorit
y
.cs
→
PcapDotNet/src/PcapDotNet.Packets/IpV4/IpV4OptionSecurityProtectionAuthorit
ies
.cs
View file @
dcd019a4
...
@@ -8,7 +8,7 @@ namespace PcapDotNet.Packets.IpV4
...
@@ -8,7 +8,7 @@ namespace PcapDotNet.Packets.IpV4
/// Protection authority flags do NOT represent accreditation authorities, though the semantics are superficially similar.
/// Protection authority flags do NOT represent accreditation authorities, though the semantics are superficially similar.
/// </summary>
/// </summary>
[
Flags
]
[
Flags
]
public
enum
IpV4OptionSecurityProtectionAuthorit
y
:
byte
public
enum
IpV4OptionSecurityProtectionAuthorit
ies
:
byte
{
{
/// <summary>
/// <summary>
/// No protection authorities.
/// No protection authorities.
...
@@ -44,6 +44,6 @@ namespace PcapDotNet.Packets.IpV4
...
@@ -44,6 +44,6 @@ namespace PcapDotNet.Packets.IpV4
/// Department of Energy (DOE).
/// Department of Energy (DOE).
/// Attn: DP343.2 Washington, DC 20545
/// Attn: DP343.2 Washington, DC 20545
/// </summary>
/// </summary>
DeparmentOfEnergy
=
0x08
Depar
t
mentOfEnergy
=
0x08
}
}
}
}
\ No newline at end of file
PcapDotNet/src/PcapDotNet.Packets/IpV4/IpV4OptionStreamIdentifier.cs
View file @
dcd019a4
...
@@ -95,6 +95,13 @@ namespace PcapDotNet.Packets.IpV4
...
@@ -95,6 +95,13 @@ namespace PcapDotNet.Packets.IpV4
Identifier
.
GetHashCode
();
Identifier
.
GetHashCode
();
}
}
/// <summary>
/// Tries to read the option from a buffer starting from the option value (after the type and length).
/// </summary>
/// <param name="buffer">The buffer to read the option from.</param>
/// <param name="offset">The offset to the first byte to read the buffer. Will be incremented by the number of bytes read.</param>
/// <param name="valueLength">The number of bytes the option value should take according to the length field that was already read.</param>
/// <returns>On success - the complex option read. On failure - null.</returns>
public
IpV4OptionComplex
CreateInstance
(
byte
[]
buffer
,
ref
int
offset
,
byte
valueLength
)
public
IpV4OptionComplex
CreateInstance
(
byte
[]
buffer
,
ref
int
offset
,
byte
valueLength
)
{
{
if
(
valueLength
!=
OptionHeaderLength
)
if
(
valueLength
!=
OptionHeaderLength
)
...
...
PcapDotNet/src/PcapDotNet.Packets/IpV4/IpV4OptionStrictSourceRouting.cs
View file @
dcd019a4
...
@@ -62,6 +62,13 @@ namespace PcapDotNet.Packets.IpV4
...
@@ -62,6 +62,13 @@ namespace PcapDotNet.Packets.IpV4
{
{
}
}
/// <summary>
/// Tries to read the option from a buffer starting from the option value (after the type and length).
/// </summary>
/// <param name="buffer">The buffer to read the option from.</param>
/// <param name="offset">The offset to the first byte to read the buffer. Will be incremented by the number of bytes read.</param>
/// <param name="valueLength">The number of bytes the option value should take according to the length field that was already read.</param>
/// <returns>On success - the complex option read. On failure - null.</returns>
public
IpV4OptionComplex
CreateInstance
(
byte
[]
buffer
,
ref
int
offset
,
byte
valueLength
)
public
IpV4OptionComplex
CreateInstance
(
byte
[]
buffer
,
ref
int
offset
,
byte
valueLength
)
{
{
IpV4Address
[]
addresses
;
IpV4Address
[]
addresses
;
...
...
PcapDotNet/src/PcapDotNet.Packets/IpV4/IpV4OptionTraceRoute.cs
View file @
dcd019a4
...
@@ -21,7 +21,7 @@ namespace PcapDotNet.Packets.IpV4
...
@@ -21,7 +21,7 @@ namespace PcapDotNet.Packets.IpV4
/// +---------------------------------------------------------------+
/// +---------------------------------------------------------------+
///
///
/// F (copy to fragments): 0 (do not copy to fragments)
/// F (copy to fragments): 0 (do not copy to fragments)
/// C (class): 2 (Debugging
&
Measurement)
/// C (class): 2 (Debugging
and
Measurement)
/// Number: 18 (F+C+Number = 82)
/// Number: 18 (F+C+Number = 82)
/// </summary>
/// </summary>
[
IpV4OptionTypeRegistration
(
IpV4OptionType
.
TraceRoute
)]
[
IpV4OptionTypeRegistration
(
IpV4OptionType
.
TraceRoute
)]
...
@@ -166,6 +166,13 @@ namespace PcapDotNet.Packets.IpV4
...
@@ -166,6 +166,13 @@ namespace PcapDotNet.Packets.IpV4
}
}
/// <summary>
/// Tries to read the option from a buffer starting from the option value (after the type and length).
/// </summary>
/// <param name="buffer">The buffer to read the option from.</param>
/// <param name="offset">The offset to the first byte to read the buffer. Will be incremented by the number of bytes read.</param>
/// <param name="valueLength">The number of bytes the option value should take according to the length field that was already read.</param>
/// <returns>On success - the complex option read. On failure - null.</returns>
public
IpV4OptionComplex
CreateInstance
(
byte
[]
buffer
,
ref
int
offset
,
byte
valueLength
)
public
IpV4OptionComplex
CreateInstance
(
byte
[]
buffer
,
ref
int
offset
,
byte
valueLength
)
{
{
if
(
valueLength
!=
OptionValueLength
)
if
(
valueLength
!=
OptionValueLength
)
...
...
PcapDotNet/src/PcapDotNet.Packets/MoreByteArray.cs
View file @
dcd019a4
...
@@ -219,18 +219,6 @@ namespace PcapDotNet.Packets
...
@@ -219,18 +219,6 @@ namespace PcapDotNet.Packets
return
new
IpV4Address
(
buffer
.
ReadUInt
(
ref
offset
,
endianity
));
return
new
IpV4Address
(
buffer
.
ReadUInt
(
ref
offset
,
endianity
));
}
}
/// <summary>
/// Reads 4 bytes from a specific offset as an IPv4 time of day with a given endianity.
/// </summary>
/// <param name="buffer">The buffer to read the bytes from.</param>
/// <param name="offset">The offset in the buffer to start reading.</param>
/// <param name="endianity">The endianity to use to translate the bytes to the value.</param>
/// <returns>The value converted from the read bytes according to the endianity.</returns>
public
static
IpV4OptionTimeOfDay
ReadIpV4OptionTimeOfDay
(
this
byte
[]
buffer
,
int
offset
,
Endianity
endianity
)
{
return
new
IpV4OptionTimeOfDay
(
buffer
.
ReadUInt
(
offset
,
endianity
));
}
/// <summary>
/// <summary>
/// Reads 4 bytes from a specific offset as an IPv4 time of day with a given endianity and increments the offset by the number of bytes read.
/// Reads 4 bytes from a specific offset as an IPv4 time of day with a given endianity and increments the offset by the number of bytes read.
/// </summary>
/// </summary>
...
...
PcapDotNet/src/PcapDotNet.Packets/PcapDotNet.Packets.csproj
View file @
dcd019a4
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<WarningLevel>
4
</WarningLevel>
<WarningLevel>
4
</WarningLevel>
<AllowUnsafeBlocks>
true
</AllowUnsafeBlocks>
<AllowUnsafeBlocks>
true
</AllowUnsafeBlocks>
<RunCodeAnalysis>
true
</RunCodeAnalysis>
<RunCodeAnalysis>
true
</RunCodeAnalysis>
<CodeAnalysisRules>
-Microsoft.Design#CA1021;-Microsoft.Design#CA1045;-Microsoft.Design#CA1028;-Microsoft.Naming#CA1710
</CodeAnalysisRules>
<CodeAnalysisRules>
-Microsoft.Design#CA1021;-Microsoft.Design#CA1045;-Microsoft.Design#CA1028;-Microsoft.
Design#CA1027;-Microsoft.
Naming#CA1710
</CodeAnalysisRules>
<DocumentationFile>
..\..\bin\Debug\PcapDotNet.Packets.XML
</DocumentationFile>
<DocumentationFile>
..\..\bin\Debug\PcapDotNet.Packets.XML
</DocumentationFile>
</PropertyGroup>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "
>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "
>
...
@@ -68,6 +68,7 @@
...
@@ -68,6 +68,7 @@
<Compile
Include=
"Ethernet\EthernetType.cs"
/>
<Compile
Include=
"Ethernet\EthernetType.cs"
/>
<Compile
Include=
"Ethernet\MacAddress.cs"
/>
<Compile
Include=
"Ethernet\MacAddress.cs"
/>
<Compile
Include=
"IDataLink.cs"
/>
<Compile
Include=
"IDataLink.cs"
/>
<Compile
Include=
"IpV4\IIpv4OptionComplexFactory.cs"
/>
<Compile
Include=
"IpV4\IpV4Address.cs"
/>
<Compile
Include=
"IpV4\IpV4Address.cs"
/>
<Compile
Include=
"IpV4\IpV4Datagram.cs"
/>
<Compile
Include=
"IpV4\IpV4Datagram.cs"
/>
<Compile
Include=
"IpV4\IpV4Fragmentation.cs"
/>
<Compile
Include=
"IpV4\IpV4Fragmentation.cs"
/>
...
@@ -76,8 +77,9 @@
...
@@ -76,8 +77,9 @@
<Compile
Include=
"IpV4\IpV4OptionComplex.cs"
/>
<Compile
Include=
"IpV4\IpV4OptionComplex.cs"
/>
<Compile
Include=
"IpV4\IpV4OptionLooseSourceRouting.cs"
/>
<Compile
Include=
"IpV4\IpV4OptionLooseSourceRouting.cs"
/>
<Compile
Include=
"IpV4\IpV4OptionQuickStart.cs"
/>
<Compile
Include=
"IpV4\IpV4OptionQuickStart.cs"
/>
<Compile
Include=
"IpV4\IpV4OptionQuickStartFunction.cs"
/>
<Compile
Include=
"IpV4\IpV4OptionRouterAlert.cs"
/>
<Compile
Include=
"IpV4\IpV4OptionRouterAlert.cs"
/>
<Compile
Include=
"IpV4\IpV4OptionSecurityProtectionAuthorit
y
.cs"
/>
<Compile
Include=
"IpV4\IpV4OptionSecurityProtectionAuthorit
ies
.cs"
/>
<Compile
Include=
"IpV4\IpV4OptionSimple.cs"
/>
<Compile
Include=
"IpV4\IpV4OptionSimple.cs"
/>
<Compile
Include=
"IpV4\IpV4OptionRecordRoute.cs"
/>
<Compile
Include=
"IpV4\IpV4OptionRecordRoute.cs"
/>
<Compile
Include=
"IpV4\IpV4OptionRoute.cs"
/>
<Compile
Include=
"IpV4\IpV4OptionRoute.cs"
/>
...
...
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