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
eff86bb1
Commit
eff86bb1
authored
Aug 26, 2011
by
Brickner_cp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DNS
parent
259185f4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
118 additions
and
16 deletions
+118
-16
DnsClass.cs
PcapDotNet/src/PcapDotNet.Packets/Dns/DnsClass.cs
+16
-9
DnsDatagram.cs
PcapDotNet/src/PcapDotNet.Packets/Dns/DnsDatagram.cs
+5
-5
DnsOpcode.cs
PcapDotNet/src/PcapDotNet.Packets/Dns/DnsOpcode.cs
+14
-0
DnsResponseCode.cs
PcapDotNet/src/PcapDotNet.Packets/Dns/DnsResponseCode.cs
+83
-2
No files found.
PcapDotNet/src/PcapDotNet.Packets/Dns/DnsClass.cs
View file @
eff86bb1
namespace
PcapDotNet.Packets.Dns
namespace
PcapDotNet.Packets.Dns
{
{
/// <summary>
/// <summary>
/// RFC 1035.
/// RFC 1035, 2136.
/// Other sources: Dyer 1987, Moon 1981.
/// CLASS fields appear in resource records.
/// CLASS fields appear in resource records.
/// </summary>
/// </summary>
public
enum
DnsClass
:
ushort
public
enum
DnsClass
:
ushort
{
{
/// <summary>
/// <summary>
/// The Internet.
/// RFC 1035.
/// Internet.
/// </summary>
/// </summary>
In
=
1
,
In
=
1
,
/// <summary>
/// <summary>
/// The CSNET class (Obsolete - used only for examples in some obsolete RFCs).
/// Moon 1981 1035.
/// </summary>
Cs
=
2
,
/// <summary>
/// The CHAOS class.
/// The CHAOS class.
/// </summary>
/// </summary>
Ch
=
3
,
Ch
=
3
,
/// <summary>
/// <summary>
/// Hesiod [Dyer 87].
/// Dyer 87.
/// Hesiod.
/// </summary>
/// </summary>
Hs
=
4
,
Hs
=
4
,
/// <summary>
/// <summary>
/// RFC 2136.
/// None.
/// Query class.
/// </summary>
NoneExistent
=
254
,
/// <summary>
/// RFC 1035.
/// *.
/// *.
/// Any class.
/// Any class.
/// Query
C
lass.
/// Query
c
lass.
/// </summary>
/// </summary>
Any
=
255
,
Any
=
255
,
...
...
PcapDotNet/src/PcapDotNet.Packets/Dns/DnsDatagram.cs
View file @
eff86bb1
...
@@ -11,7 +11,7 @@ namespace PcapDotNet.Packets.Dns
...
@@ -11,7 +11,7 @@ namespace PcapDotNet.Packets.Dns
/// The top level format of message is divided into 5 sections (some of which are empty in certain cases) shown below:
/// The top level format of message is divided into 5 sections (some of which are empty in certain cases) shown below:
/// <pre>
/// <pre>
/// +-----+----+--------+----+----+----+----+------+--------+
/// +-----+----+--------+----+----+----+----+------+--------+
/// | bit | 0 | 1-4 | 5 | 6 | 7 | 8 | 9-1
1 | 12
-15 |
/// | bit | 0 | 1-4 | 5 | 6 | 7 | 8 | 9-1
0 | 11
-15 |
/// +-----+----+--------+----+----+----+----+------+--------+
/// +-----+----+--------+----+----+----+----+------+--------+
/// | 0 | ID |
/// | 0 | ID |
/// +-----+----+--------+----+----+----+----+------+--------+
/// +-----+----+--------+----+----+----+----+------+--------+
...
@@ -72,14 +72,14 @@ namespace PcapDotNet.Packets.Dns
...
@@ -72,14 +72,14 @@ namespace PcapDotNet.Packets.Dns
public
const
byte
IsTruncated
=
0x02
;
public
const
byte
IsTruncated
=
0x02
;
public
const
byte
IsRecusionDesired
=
0x01
;
public
const
byte
IsRecusionDesired
=
0x01
;
public
const
byte
IsRecusionAvailable
=
0x80
;
public
const
byte
IsRecusionAvailable
=
0x80
;
public
const
byte
FutureUse
=
0x
7
0
;
public
const
byte
FutureUse
=
0x
6
0
;
public
const
byte
ResponseCode
=
0x
0
F
;
public
const
byte
ResponseCode
=
0x
1
F
;
}
}
private
static
class
Shift
private
static
class
Shift
{
{
public
const
int
Opcode
=
3
;
public
const
int
Opcode
=
3
;
public
const
int
FutureUse
=
4
;
public
const
int
FutureUse
=
5
;
}
}
/// <summary>
/// <summary>
...
@@ -87,7 +87,7 @@ namespace PcapDotNet.Packets.Dns
...
@@ -87,7 +87,7 @@ namespace PcapDotNet.Packets.Dns
/// </summary>
/// </summary>
public
const
int
HeaderLength
=
12
;
public
const
int
HeaderLength
=
12
;
public
const
byte
MaxFutureUse
=
7
;
public
const
byte
MaxFutureUse
=
3
;
/// <summary>
/// <summary>
/// A 16 bit identifier assigned by the program that generates any kind of query.
/// A 16 bit identifier assigned by the program that generates any kind of query.
...
...
PcapDotNet/src/PcapDotNet.Packets/Dns/DnsOpcode.cs
View file @
eff86bb1
namespace
PcapDotNet.Packets.Dns
namespace
PcapDotNet.Packets.Dns
{
{
/// <summary>
/// <summary>
/// RFCs 1035, 1996, 2136, 3425.
/// Specifies kind of query in this message.
/// Specifies kind of query in this message.
/// This value is set by the originator of a query and copied into the response.
/// This value is set by the originator of a query and copied into the response.
/// </summary>
/// </summary>
public
enum
DnsOpcode
:
byte
public
enum
DnsOpcode
:
byte
{
{
/// <summary>
/// <summary>
/// RFC 1035.
/// A standard query (QUERY).
/// A standard query (QUERY).
/// </summary>
/// </summary>
Query
=
0
,
Query
=
0
,
/// <summary>
/// <summary>
/// RFC 3425.
/// An inverse query (IQUERY).
/// An inverse query (IQUERY).
/// </summary>
/// </summary>
IQuery
=
1
,
IQuery
=
1
,
/// <summary>
/// <summary>
/// RFC 1035.
/// A server status request (STATUS).
/// A server status request (STATUS).
/// </summary>
/// </summary>
Status
=
2
,
Status
=
2
,
/// <summary>
/// RFC 1996.
/// </summary>
Notify
=
4
,
/// <summary>
/// RFC 2136.
/// </summary>
Update
=
5
,
}
}
}
}
\ No newline at end of file
PcapDotNet/src/PcapDotNet.Packets/Dns/DnsResponseCode.cs
View file @
eff86bb1
namespace
PcapDotNet.Packets.Dns
namespace
PcapDotNet.Packets.Dns
{
{
/// <summary>
/// RFCs 1035, 2136, 2671, 2845, 2930, 4635.
/// </summary>
public
enum
DnsResponseCode
:
byte
public
enum
DnsResponseCode
:
byte
{
{
/// <summary>
/// <summary>
/// RFC 1035.
/// No error condition
/// No error condition
/// </summary>
/// </summary>
NoError
=
0
,
NoError
=
0
,
/// <summary>
/// <summary>
/// RFC 1035.
/// Format error - The name server was unable to interpret the query.
/// Format error - The name server was unable to interpret the query.
/// </summary>
/// </summary>
FormatError
=
1
,
FormatError
=
1
,
/// <summary>
/// <summary>
/// RFC 1035.
/// Server failure - The name server was unable to process this query due to a problem with the name server.
/// Server failure - The name server was unable to process this query due to a problem with the name server.
/// </summary>
/// </summary>
ServerFailure
=
2
,
ServerFailure
=
2
,
/// <summary>
/// <summary>
/// RFC 1035.
/// Name Error - Meaningful only for responses from an authoritative name server,
/// Name Error - Meaningful only for responses from an authoritative name server,
/// this code signifies that the domain name referenced in the query does not exist.
/// this code signifies that the domain name referenced in the query does not exist.
/// </summary>
/// </summary>
N
ameError
=
3
,
N
otExistentDomain
=
3
,
/// <summary>
/// <summary>
/// RFC 1035.
/// Not Implemented - The name server does not support the requested kind of query.
/// Not Implemented - The name server does not support the requested kind of query.
/// </summary>
/// </summary>
NotImplemented
=
4
,
NotImplemented
=
4
,
/// <summary>
/// <summary>
/// RFC 1035.
/// Refused - The name server refuses to perform the specified operation for policy reasons.
/// Refused - The name server refuses to perform the specified operation for policy reasons.
/// For example, a name server may not wish to provide the information to the particular requester,
/// For example, a name server may not wish to provide the information to the particular requester,
/// or a name server may not wish to perform a particular operation (e.g., zone transfer) for particular data.
/// or a name server may not wish to perform a particular operation (e.g., zone transfer) for particular data.
/// </summary>
/// </summary>
Refused
=
5
,
Refused
=
5
,
/// <summary>
/// RFC 2136.
/// YXDomain. Name Exists when it should not
/// </summary>
YxDomain
=
6
,
/// <summary>
/// RFC 2136.
/// RR Set Exists when it should not.
/// </summary>
YxRrSet
=
7
,
/// <summary>
/// RFC 2136.
/// RR Set that should exist does not.
/// </summary>
NxRrSet
=
8
,
/// <summary>
/// RFC 2136.
/// Server Not Authoritative for zone.
/// </summary>
NotAuth
=
9
,
/// <summary>
/// RFC 2136.
/// Name not contained in zone.
/// </summary>
NotZone
=
10
,
/// <summary>
/// RFCs 2671, 2845.
/// Bad OPT Version or TSIG Signature Failure.
/// </summary>
BadVersOrBadSig
=
16
,
/// <summary>
/// RFC 2845.
/// Key not recognized.
/// </summary>
BadKey
=
17
,
/// <summary>
/// RFC 2845.
/// Signature out of time window.
/// </summary>
BadTime
=
18
,
/// <summary>
/// RFC 2930.
/// Bad TKEY Mode.
/// </summary>
BadMode
=
19
,
/// <summary>
/// RFC 2930.
/// Duplicate key name.
/// </summary>
BadName
=
20
,
/// <summary>
/// RFC 2930.
/// Algorithm not supported.
/// </summary>
BadAlg
=
21
,
/// <summary>
/// RFC 4635.
/// Bad Truncation.
/// </summary>
BadTrunc
=
22
,
}
}
}
}
\ No newline at end of file
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