-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDNSFlagsField.java
More file actions
107 lines (93 loc) · 2.8 KB
/
DNSFlagsField.java
File metadata and controls
107 lines (93 loc) · 2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/**
* Representation of the flags field of a DNS header. Contains getters and
* setters for all of the flags and values contained within the flags field.
*
* @author Chris Blades
* @version 3/2/10
*/
public interface DNSFlagsField extends DNSObject {
/**
* Returns wether the response flag is set or not
*
* @return true if this flags field represents a request
*/
public boolean isRequest();
/**
* Returns the opcode vale of this flags field
*
* @return the opcode value of this flags field
*/
public DNSOpcode getOpcode();
/**
* Returns wether the authoritative bit is set in this flags field.
*
* @return the state of the authoritative bit
*/
public boolean isAuthorative();
/**
* Returns wether the truncated bit is set in this flags field.
*
* @return the state of the truncated bit
*/
public boolean isTruncated();
/**
* Returns wether the recursion desired bit is set in this flags field.
*
* @return the state of the recursion desired bit.
*/
public boolean recursionDesired();
/**
* Returns wether the recursion available bit is set in this flags field.
*
* @return the state of the recursion available bit.
*/
public boolean recursionAvailable();
/**
* Returns the return code value of the flags field.
*
* @return the return code of this flags field
*/
public int getReturnCode();
/**
* Sets wether this flags field represents a request.
*
* @param request wether this flags field is a request.
*/
public void setIsRequest(boolean request);
/**
* Sets the opcode of this flags field.
*
* @param opcode the new Opcode of this flags field.
*/
public void setOpcode(DNSOpcode opcode);
/**
* sets the state of the authoritative bit.
*
* @param authoritative the state of the authoritative bit
*/
public void setAuthoritative(boolean authoritative);
/**
* sets the state of the truncated bit.
*
* @param truncated the state of the truncated bit
*/
public void setTruncated(boolean truncated);
/**
* sets the state of the recursion desired bit.
*
* @param recursionDesired the state of the recursion desired bit
*/
public void setRecursionDesired(boolean recursionDesired);
/**
* sets the state of the recursion available bit.
*
* @param recursionAvailable the state of the recursion available bit
*/
public void setRecursionAvailable(boolean recursionAvailable);
/**
* Sets the return code of this flags field.
*
* @param code the new return code of this flags field
*/
public void setReturnCode(int code);
}