-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDNSPacket.java
More file actions
79 lines (70 loc) · 1.99 KB
/
DNSPacket.java
File metadata and controls
79 lines (70 loc) · 1.99 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
import java.util.List;
/**
* Defines getter and setter methods for the contents of a
* DNS packet.
*
* @author Chris Blades
* @version 1/20/2010
*/
public interface DNSPacket extends DNSObject {
/**
* Returns the header of this DNSPacket.
*
* @return This packet's header
*/
public DNSHeader getHeader();
/**
* Returns a list of all the questions contained in this packet.
*
* @return a list of all the questions in this packet
*/
public List<DNSQuestion> getQuestions();
/**
* Returns a list of all the answers contained in this packet.
*
* @return a list of all the answers in this packet
*/
public List<DNSAnswer> getAnswers();
/**
* Returns a list of all the authority answers contained in this packet.
*
* @return a list of all the authority answers in this packet
*/
public List<DNSAnswer> getAuthoritativeAnswers();
/**
* Returns a list of all the additional answers contained in this packet.
*
* @return a list of all the additional answers in this packet
*/
public List<DNSAnswer> getAdditionalAnswers();
/**
* Sets the header of this DNSPacket.
*
* @param header the new header of this DNSpacket.
*/
public void setHeader(DNSHeader header);
/**
* Sets the question contained in this packet.
*
* @param question the question contained in this packet.
*/
public void setQuestion(DNSQuestion question);
/**
* adds an answer to this packet
*
* @param answer the answer to add
*/
public void addAnswer(DNSAnswer answer);
/**
* adds an authority answer to this packet
*
* @param answer the authority answer to add
*/
public void addAuthoritativeAnswer(DNSAnswer answer);
/**
* adds an additional answer to this packet
*
* @param answer the additional answer to add
*/
public void addAdditionalAnswer(DNSAnswer answer);
}