Dns.py
766 Bytes
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
"""
@author Georg Hopp
"""
from ..Protocol import Protocol
from Parser import Parser
from Composer import Composer
from Message import Message
class Dns(Protocol):
def __init__(self):
self.parser = Parser()
self.composer = Composer()
def getParser(self):
return self.parser
def getComposer(self):
return self.composer
def createMessage(self, remote = None):
return Message(remote)
def createRequest(self, remote = None):
return Message(remote)
def createResponse(self, req, remote = None):
return Message(remote, req)
def upgrade(self, message):
'''
there is no upgrade mechanism for DNS
'''
pass
# vim: set ft=python et ts=8 sw=4 sts=4: