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
c17d49be
Commit
c17d49be
authored
Sep 27, 2009
by
Brickner_cp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IGMP
parent
45344f31
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
630 additions
and
41 deletions
+630
-41
MoreTimeSpan.cs
PcapDotNet/src/PcapDotNet.Base/MoreTimeSpan.cs
+14
-0
PcapDotNet.Base.csproj
PcapDotNet/src/PcapDotNet.Base/PcapDotNet.Base.csproj
+1
-0
IgmpTests.cs
PcapDotNet/src/PcapDotNet.Packets.Test/IgmpTests.cs
+196
-0
PcapDotNet.Packets.Test.csproj
...rc/PcapDotNet.Packets.Test/PcapDotNet.Packets.Test.csproj
+1
-0
IgmpDatagram.cs
PcapDotNet/src/PcapDotNet.Packets/Igmp/IgmpDatagram.cs
+127
-20
IgmpGroupRecordDatagram.cs
...et/src/PcapDotNet.Packets/Igmp/IgmpGroupRecordDatagram.cs
+3
-0
IgmpMessageType.cs
PcapDotNet/src/PcapDotNet.Packets/Igmp/IgmpMessageType.cs
+1
-1
IpV4Address.cs
PcapDotNet/src/PcapDotNet.Packets/IpV4/IpV4Address.cs
+14
-8
PacketBuilder.cs
PcapDotNet/src/PcapDotNet.Packets/PacketBuilder.cs
+267
-11
PcapDotNet.Packets.csproj
PcapDotNet/src/PcapDotNet.Packets/PcapDotNet.Packets.csproj
+1
-1
MoreRandom.cs
PcapDotNet/src/PcapDotNet.TestUtils/MoreRandom.cs
+5
-0
No files found.
PcapDotNet/src/PcapDotNet.Base/MoreTimeSpan.cs
0 → 100644
View file @
c17d49be
using
System
;
using
System.Collections.Generic
;
using
System.Collections.ObjectModel
;
namespace
PcapDotNet.Base
{
public
static
class
MoreTimeSpan
{
public
static
TimeSpan
Divide
(
this
TimeSpan
timeSpan
,
double
value
)
{
return
TimeSpan
.
FromTicks
((
long
)(
timeSpan
.
Ticks
/
value
));
}
}
}
\ No newline at end of file
PcapDotNet/src/PcapDotNet.Base/PcapDotNet.Base.csproj
View file @
c17d49be
...
@@ -62,6 +62,7 @@
...
@@ -62,6 +62,7 @@
<Compile
Include=
"MoreIEnumerable.cs"
/>
<Compile
Include=
"MoreIEnumerable.cs"
/>
<Compile
Include=
"MoreIList.cs"
/>
<Compile
Include=
"MoreIList.cs"
/>
<Compile
Include=
"MorePropertyInfo.cs"
/>
<Compile
Include=
"MorePropertyInfo.cs"
/>
<Compile
Include=
"MoreTimeSpan.cs"
/>
<Compile
Include=
"MoreType.cs"
/>
<Compile
Include=
"MoreType.cs"
/>
<Compile
Include=
"Tuple.cs"
/>
<Compile
Include=
"Tuple.cs"
/>
<Compile
Include=
"UInt24.cs"
/>
<Compile
Include=
"UInt24.cs"
/>
...
...
PcapDotNet/src/PcapDotNet.Packets.Test/IgmpTests.cs
0 → 100644
View file @
c17d49be
This diff is collapsed.
Click to expand it.
PcapDotNet/src/PcapDotNet.Packets.Test/PcapDotNet.Packets.Test.csproj
View file @
c17d49be
...
@@ -49,6 +49,7 @@
...
@@ -49,6 +49,7 @@
<Compile Include="DataLinkTests.cs" />
<Compile Include="DataLinkTests.cs" />
<Compile Include="EndianitiyTests.cs" />
<Compile Include="EndianitiyTests.cs" />
<Compile Include="EthernetTests.cs" />
<Compile Include="EthernetTests.cs" />
<Compile Include="IgmpTests.cs" />
<Compile Include="IpV4Tests.cs" />
<Compile Include="IpV4Tests.cs" />
<Compile Include="MacAddressTests.cs" />
<Compile Include="MacAddressTests.cs" />
<Compile Include="PacketTests.cs" />
<Compile Include="PacketTests.cs" />
...
...
PcapDotNet/src/PcapDotNet.Packets/Igmp/IgmpDatagram.cs
View file @
c17d49be
This diff is collapsed.
Click to expand it.
PcapDotNet/src/PcapDotNet.Packets/Igmp/IgmpGroupRecordDatagram.cs
View file @
c17d49be
...
@@ -48,6 +48,9 @@ namespace PcapDotNet.Packets.Igmp
...
@@ -48,6 +48,9 @@ namespace PcapDotNet.Packets.Igmp
public
const
int
HeaderMinimumLength
=
8
;
public
const
int
HeaderMinimumLength
=
8
;
/// <summary>
/// The type of group record included in the report message.
/// </summary>
public
IgmpRecordType
RecordType
public
IgmpRecordType
RecordType
{
{
get
{
return
(
IgmpRecordType
)
this
[
Offset
.
RecordType
];
}
get
{
return
(
IgmpRecordType
)
this
[
Offset
.
RecordType
];
}
...
...
PcapDotNet/src/PcapDotNet.Packets/Igmp/IgmpType.cs
→
PcapDotNet/src/PcapDotNet.Packets/Igmp/Igmp
Message
Type.cs
View file @
c17d49be
namespace
PcapDotNet.Packets.Igmp
namespace
PcapDotNet.Packets.Igmp
{
{
public
enum
IgmpType
:
byte
public
enum
Igmp
Message
Type
:
byte
{
{
/// <summary>
/// <summary>
/// Illegal type.
/// Illegal type.
...
...
PcapDotNet/src/PcapDotNet.Packets/IpV4/IpV4Address.cs
View file @
c17d49be
...
@@ -13,6 +13,19 @@ namespace PcapDotNet.Packets.IpV4
...
@@ -13,6 +13,19 @@ namespace PcapDotNet.Packets.IpV4
/// </summary>
/// </summary>
public
const
int
SizeOf
=
sizeof
(
uint
);
public
const
int
SizeOf
=
sizeof
(
uint
);
/// <summary>
/// The zero address (0.0.0.0).
/// </summary>
public
static
IpV4Address
Zero
{
get
{
return
_zero
;
}
}
public
static
IpV4Address
AllHostsHroupAddress
{
get
{
return
_allHostsHroupAddress
;
}
}
/// <summary>
/// <summary>
/// Create an address from a 32 bit integer.
/// Create an address from a 32 bit integer.
/// 0 -> 0.0.0.0
/// 0 -> 0.0.0.0
...
@@ -36,14 +49,6 @@ namespace PcapDotNet.Packets.IpV4
...
@@ -36,14 +49,6 @@ namespace PcapDotNet.Packets.IpV4
(
byte
.
Parse
(
values
[
3
],
CultureInfo
.
InvariantCulture
)));
(
byte
.
Parse
(
values
[
3
],
CultureInfo
.
InvariantCulture
)));
}
}
/// <summary>
/// The zero address (0.0.0.0).
/// </summary>
public
static
IpV4Address
Zero
{
get
{
return
_zero
;
}
}
/// <summary>
/// <summary>
/// Gets the address valud as a 32 bit integer.
/// Gets the address valud as a 32 bit integer.
/// </summary>
/// </summary>
...
@@ -113,5 +118,6 @@ namespace PcapDotNet.Packets.IpV4
...
@@ -113,5 +118,6 @@ namespace PcapDotNet.Packets.IpV4
private
readonly
uint
_value
;
private
readonly
uint
_value
;
private
static
readonly
IpV4Address
_zero
=
new
IpV4Address
(
0
);
private
static
readonly
IpV4Address
_zero
=
new
IpV4Address
(
0
);
private
static
readonly
IpV4Address
_allHostsHroupAddress
=
new
IpV4Address
(
"224.0.0.1"
);
}
}
}
}
\ No newline at end of file
PcapDotNet/src/PcapDotNet.Packets/PacketBuilder.cs
View file @
c17d49be
This diff is collapsed.
Click to expand it.
PcapDotNet/src/PcapDotNet.Packets/PcapDotNet.Packets.csproj
View file @
c17d49be
...
@@ -75,7 +75,7 @@
...
@@ -75,7 +75,7 @@
<Compile
Include=
"Igmp\IgmpGroupRecordDatagram.cs"
/>
<Compile
Include=
"Igmp\IgmpGroupRecordDatagram.cs"
/>
<Compile
Include=
"Igmp\IgmpQueryVersion.cs"
/>
<Compile
Include=
"Igmp\IgmpQueryVersion.cs"
/>
<Compile
Include=
"Igmp\IgmpRecordType.cs"
/>
<Compile
Include=
"Igmp\IgmpRecordType.cs"
/>
<Compile
Include=
"Igmp\IgmpType.cs"
/>
<Compile
Include=
"Igmp\Igmp
Message
Type.cs"
/>
<Compile
Include=
"IOptionUnknownFactory.cs"
/>
<Compile
Include=
"IOptionUnknownFactory.cs"
/>
<Compile
Include=
"IpV4\IpV4OptionUnknown.cs"
/>
<Compile
Include=
"IpV4\IpV4OptionUnknown.cs"
/>
<Compile
Include=
"Option.cs"
/>
<Compile
Include=
"Option.cs"
/>
...
...
PcapDotNet/src/PcapDotNet.TestUtils/MoreRandom.cs
View file @
c17d49be
...
@@ -101,6 +101,11 @@ namespace PcapDotNet.TestUtils
...
@@ -101,6 +101,11 @@ namespace PcapDotNet.TestUtils
return
random
.
NextDateTime
(
DateTime
.
MinValue
,
DateTime
.
MaxValue
);
return
random
.
NextDateTime
(
DateTime
.
MinValue
,
DateTime
.
MaxValue
);
}
}
public
static
TimeSpan
NextTimeSpan
(
this
Random
random
,
TimeSpan
minimumValue
,
TimeSpan
maximumValue
)
{
return
TimeSpan
.
FromTicks
(
random
.
NextLong
(
minimumValue
.
Ticks
,
maximumValue
.
Ticks
+
1
));
}
public
static
T
NextEnum
<
T
>(
this
Random
random
,
IEnumerable
<
T
>
valuesToIgnore
)
public
static
T
NextEnum
<
T
>(
this
Random
random
,
IEnumerable
<
T
>
valuesToIgnore
)
{
{
Type
type
=
typeof
(
T
);
Type
type
=
typeof
(
T
);
...
...
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