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
0ad9add1
Commit
0ad9add1
authored
Feb 18, 2012
by
Brickner_cp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Warnings, Code Analysis and Documentation. 335 warnings left.
parent
35ef2046
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
151 additions
and
1 deletion
+151
-1
DnsDomainNameCompressionMode.cs
...rc/PcapDotNet.Packets/Dns/DnsDomainNameCompressionMode.cs
+10
-0
DnsOptVersion.cs
PcapDotNet/src/PcapDotNet.Packets/Dns/DnsOptVersion.cs
+7
-0
DnsAtmAddressFormat.cs
...capDotNet.Packets/Dns/ResourceData/DnsAtmAddressFormat.cs
+3
-0
DnsCertificateType.cs
...PcapDotNet.Packets/Dns/ResourceData/DnsCertificateType.cs
+7
-0
DnsDigestType.cs
.../src/PcapDotNet.Packets/Dns/ResourceData/DnsDigestType.cs
+7
-0
DnsGateway.cs
...Net/src/PcapDotNet.Packets/Dns/ResourceData/DnsGateway.cs
+23
-1
DnsGatewayDomainName.cs
...apDotNet.Packets/Dns/ResourceData/DnsGatewayDomainName.cs
+21
-0
DnsGatewayIpV4.cs
...src/PcapDotNet.Packets/Dns/ResourceData/DnsGatewayIpV4.cs
+21
-0
DnsGatewayIpV6.cs
...src/PcapDotNet.Packets/Dns/ResourceData/DnsGatewayIpV6.cs
+21
-0
DnsGatewayNone.cs
...src/PcapDotNet.Packets/Dns/ResourceData/DnsGatewayNone.cs
+15
-0
DnsLongLivedQueryErrorCode.cs
...et.Packets/Dns/ResourceData/DnsLongLivedQueryErrorCode.cs
+3
-0
DnsOptionCode.cs
.../src/PcapDotNet.Packets/Dns/ResourceData/DnsOptionCode.cs
+7
-0
DnsResourceDataNoCompression.cs
....Packets/Dns/ResourceData/DnsResourceDataNoCompression.cs
+3
-0
DnsResourceDataSimple.cs
...pDotNet.Packets/Dns/ResourceData/DnsResourceDataSimple.cs
+3
-0
No files found.
PcapDotNet/src/PcapDotNet.Packets/Dns/DnsDomainNameCompressionMode.cs
View file @
0ad9add1
namespace
PcapDotNet.Packets.Dns
{
/// <summary>
/// Defines when and how to compress DNS domain names when creating a DNS datagram.
/// </summary>
public
enum
DnsDomainNameCompressionMode
{
/// <summary>
/// Compress any domain name if possible.
/// </summary>
All
,
/// <summary>
/// Never compress domain names.
/// </summary>
Nothing
}
}
\ No newline at end of file
PcapDotNet/src/PcapDotNet.Packets/Dns/DnsOptVersion.cs
View file @
0ad9add1
namespace
PcapDotNet.Packets.Dns
{
/// <summary>
/// RFC 2671.
/// The implementation level of whoever sets it for the OPT resource record.
/// </summary>
public
enum
DnsOptVersion
:
byte
{
/// <summary>
/// Full conformance with the specification.
/// </summary>
Version0
=
0
,
}
}
\ No newline at end of file
PcapDotNet/src/PcapDotNet.Packets/Dns/ResourceData/DnsAtmAddressFormat.cs
View file @
0ad9add1
namespace
PcapDotNet.Packets.Dns
{
/// <summary>
/// The ATM address format values.
/// </summary>
public
enum
DnsAtmAddressFormat
:
byte
{
/// <summary>
...
...
PcapDotNet/src/PcapDotNet.Packets/Dns/ResourceData/DnsCertificateType.cs
View file @
0ad9add1
namespace
PcapDotNet.Packets.Dns
{
/// <summary>
/// The certificate type for cetificate DNS resource records.
/// </summary>
public
enum
DnsCertificateType
:
ushort
{
/// <summary>
/// No certificate type defined.
/// Should not be used.
/// </summary>
None
=
0
,
/// <summary>
...
...
PcapDotNet/src/PcapDotNet.Packets/Dns/ResourceData/DnsDigestType.cs
View file @
0ad9add1
namespace
PcapDotNet.Packets.Dns
{
/// <summary>
/// The type of digest that is used to create a digest value.
/// </summary>
public
enum
DnsDigestType
:
byte
{
/// <summary>
/// No definition for digest type.
/// Should not be used.
/// </summary>
None
=
0
,
/// <summary>
...
...
PcapDotNet/src/PcapDotNet.Packets/Dns/ResourceData/DnsGateway.cs
View file @
0ad9add1
...
...
@@ -4,21 +4,43 @@ using PcapDotNet.Packets.IpV6;
namespace
PcapDotNet.Packets.Dns
{
/// <summary>
/// Represents a gateway to which an IPsec tunnel may be created in order to reach the entity named by an IPsec resource record.
/// </summary>
public
abstract
class
DnsGateway
:
IEquatable
<
DnsGateway
>
{
/// <summary>
/// An instance that represents that no gateway exists.
/// </summary>
public
static
DnsGatewayNone
None
{
get
{
return
_none
;
}
}
/// <summary>
/// The gateway represnetation type.
/// </summary>
public
abstract
DnsGatewayType
GatewayType
{
get
;
}
/// <summary>
/// The number of bytes the gateway represnetation takes.
/// </summary>
public
abstract
int
Length
{
get
;
}
/// <summary>
/// Two gateway representations are equal if they are of the same type and the value is the same.
/// </summary>
public
abstract
bool
Equals
(
DnsGateway
other
);
/// <summary>
/// Two gateway representations are equal if they are of the same type and the value is the same.
/// </summary>
public
override
bool
Equals
(
object
obj
)
{
return
Equals
(
obj
as
DnsGateway
);
}
/// <summary>
/// Serves as a hash function for a particular type.
/// </summary>
/// <returns>A hash code for the current gateway represnetation.</returns>
public
override
int
GetHashCode
()
{
return
GatewayType
.
GetHashCode
()
^
DataGetHashCode
();
...
...
PcapDotNet/src/PcapDotNet.Packets/Dns/ResourceData/DnsGatewayDomainName.cs
View file @
0ad9add1
...
...
@@ -2,31 +2,52 @@
namespace
PcapDotNet.Packets.Dns
{
/// <summary>
/// A gateway that is represented using a domain name.
/// </summary>
public
class
DnsGatewayDomainName
:
DnsGateway
,
IEquatable
<
DnsGatewayDomainName
>
{
/// <summary>
/// Creates the gateway using the given domain name.
/// </summary>
public
DnsGatewayDomainName
(
DnsDomainName
value
)
{
Value
=
value
;
}
/// <summary>
/// Returns the domain name value.
/// </summary>
public
DnsDomainName
Value
{
get
;
private
set
;
}
/// <summary>
/// The gateway represnetation type.
/// </summary>
public
override
DnsGatewayType
GatewayType
{
get
{
return
DnsGatewayType
.
DomainName
;
}
}
/// <summary>
/// The number of bytes the gateway represnetation takes.
/// </summary>
public
override
int
Length
{
get
{
return
Value
.
NonCompressedLength
;
}
}
/// <summary>
/// Two DnsGatewayDomainName are equal if their domain name values are equal.
/// </summary>
public
bool
Equals
(
DnsGatewayDomainName
other
)
{
return
other
!=
null
&&
Value
.
Equals
(
other
.
Value
);
}
/// <summary>
/// Two gateway representations are equal if they are of the same type and the value is the same.
/// </summary>
public
override
bool
Equals
(
DnsGateway
other
)
{
return
Equals
(
other
as
DnsGatewayDomainName
);
...
...
PcapDotNet/src/PcapDotNet.Packets/Dns/ResourceData/DnsGatewayIpV4.cs
View file @
0ad9add1
...
...
@@ -3,31 +3,52 @@ using PcapDotNet.Packets.IpV4;
namespace
PcapDotNet.Packets.Dns
{
/// <summary>
/// Represents an IPv4 gateway to which an IPsec tunnel may be created in order to reach the entity named by an IPsec resource record.
/// </summary>
public
class
DnsGatewayIpV4
:
DnsGateway
,
IEquatable
<
DnsGatewayIpV4
>
{
/// <summary>
/// Creates a gateway using the given IPv4 address.
/// </summary>
public
DnsGatewayIpV4
(
IpV4Address
value
)
{
Value
=
value
;
}
/// <summary>
/// The IPv4 address value of the gateway.
/// </summary>
public
IpV4Address
Value
{
get
;
private
set
;
}
/// <summary>
/// The gateway represnetation type.
/// </summary>
public
override
DnsGatewayType
GatewayType
{
get
{
return
DnsGatewayType
.
IpV4
;
}
}
/// <summary>
/// The number of bytes the gateway represnetation takes.
/// </summary>
public
override
int
Length
{
get
{
return
IpV4Address
.
SizeOf
;
}
}
/// <summary>
/// Two DnsGatewayIpV4 are equal if their IPv4 addresses are equal.
/// </summary>
public
bool
Equals
(
DnsGatewayIpV4
other
)
{
return
other
!=
null
&&
Value
.
Equals
(
other
.
Value
);
}
/// <summary>
/// Two gateway representations are equal if they are of the same type and the value is the same.
/// </summary>
public
override
bool
Equals
(
DnsGateway
other
)
{
return
Equals
(
other
as
DnsGatewayIpV4
);
...
...
PcapDotNet/src/PcapDotNet.Packets/Dns/ResourceData/DnsGatewayIpV6.cs
View file @
0ad9add1
...
...
@@ -3,31 +3,52 @@ using PcapDotNet.Packets.IpV6;
namespace
PcapDotNet.Packets.Dns
{
/// <summary>
/// Represents an IPv6 gateway to which an IPsec tunnel may be created in order to reach the entity named by an IPsec resource record.
/// </summary>
public
class
DnsGatewayIpV6
:
DnsGateway
,
IEquatable
<
DnsGatewayIpV6
>
{
/// <summary>
/// Creates a gateway using the given IPv6 address.
/// </summary>
public
DnsGatewayIpV6
(
IpV6Address
value
)
{
Value
=
value
;
}
/// <summary>
/// The IPv6 address value of the gateway.
/// </summary>
public
IpV6Address
Value
{
get
;
private
set
;
}
/// <summary>
/// The gateway represnetation type.
/// </summary>
public
override
DnsGatewayType
GatewayType
{
get
{
return
DnsGatewayType
.
IpV6
;
}
}
/// <summary>
/// The number of bytes the gateway represnetation takes.
/// </summary>
public
override
int
Length
{
get
{
return
IpV6Address
.
SizeOf
;
}
}
/// <summary>
/// Two DnsGatewayIpV6 are equal if their IPv6 addresses are equal.
/// </summary>
public
bool
Equals
(
DnsGatewayIpV6
other
)
{
return
other
!=
null
&&
Value
.
Equals
(
other
.
Value
);
}
/// <summary>
/// Two gateway representations are equal if they are of the same type and the value is the same.
/// </summary>
public
override
bool
Equals
(
DnsGateway
other
)
{
return
Equals
(
other
as
DnsGatewayIpV6
);
...
...
PcapDotNet/src/PcapDotNet.Packets/Dns/ResourceData/DnsGatewayNone.cs
View file @
0ad9add1
...
...
@@ -2,23 +2,38 @@
namespace
PcapDotNet.Packets.Dns
{
/// <summary>
/// A gateway representation that represents that no gateway is present.
/// </summary>
public
class
DnsGatewayNone
:
DnsGateway
,
IEquatable
<
DnsGatewayNone
>
{
/// <summary>
/// The gateway represnetation type.
/// </summary>
public
override
DnsGatewayType
GatewayType
{
get
{
return
DnsGatewayType
.
None
;
}
}
/// <summary>
/// The number of bytes the gateway represnetation takes.
/// </summary>
public
override
int
Length
{
get
{
return
0
;
}
}
/// <summary>
/// Two DnsGatewayNone are always equal.
/// </summary>
public
bool
Equals
(
DnsGatewayNone
other
)
{
return
other
!=
null
;
}
/// <summary>
/// Two gateway representations are equal if they are of the same type and the value is the same.
/// </summary>
public
override
bool
Equals
(
DnsGateway
other
)
{
return
Equals
(
other
as
DnsGatewayNone
);
...
...
PcapDotNet/src/PcapDotNet.Packets/Dns/ResourceData/DnsLongLivedQueryErrorCode.cs
View file @
0ad9add1
namespace
PcapDotNet.Packets.Dns
{
/// <summary>
/// The DNS LLQ Error code values.
/// </summary>
public
enum
DnsLongLivedQueryErrorCode
:
ushort
{
/// <summary>
...
...
PcapDotNet/src/PcapDotNet.Packets/Dns/ResourceData/DnsOptionCode.cs
View file @
0ad9add1
namespace
PcapDotNet.Packets.Dns
{
/// <summary>
/// The option code for a DNS option.
/// </summary>
public
enum
DnsOptionCode
:
ushort
{
/// <summary>
/// No code defined.
/// Should not be used.
/// </summary>
None
=
0
,
/// <summary>
...
...
PcapDotNet/src/PcapDotNet.Packets/Dns/ResourceData/DnsResourceDataNoCompression.cs
View file @
0ad9add1
namespace
PcapDotNet.Packets.Dns
{
/// <summary>
/// A DNS resource record type that any domain name that it contains should not be compressed when written.
/// </summary>
public
abstract
class
DnsResourceDataNoCompression
:
DnsResourceData
{
internal
sealed
override
int
GetLength
(
DnsDomainNameCompressionData
compressionData
,
int
offsetInDns
)
...
...
PcapDotNet/src/PcapDotNet.Packets/Dns/ResourceData/DnsResourceDataSimple.cs
View file @
0ad9add1
namespace
PcapDotNet.Packets.Dns
{
/// <summary>
/// A DNS resource record type that any domain name that it contains should not be compressed when written and cannot decompress them when reads them.
/// </summary>
public
abstract
class
DnsResourceDataSimple
:
DnsResourceDataNoCompression
{
internal
sealed
override
int
WriteData
(
byte
[]
buffer
,
int
offset
)
...
...
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