Dns.py 766 Bytes
"""
@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: