def __init__(self, address, peer, dh_group=14, nonce_len=32):
        """

        :param address: local address tuple(host, port)
        :param peer: remote address tuple(host, port)
        :param dh_group: diffie hellman group number
        :param nonce_len: length of Nonce data
        """
        self.iSPI = 0  # XXX: Should be generated here and passed downwards
        self.rSPI = 0
        self.diffie_hellman = DiffieHellman(dh_group)
        self.Ni = os.urandom(nonce_len)
        self.packets = list()
        self.state = State.STARTING
        self.address = address
        self.peer = peer
def __init__ ( self , address , peer , dh_group = 14 , nonce_len = 32 ) : self . iSPI = 0 self . rSPI = 0 self . diffie_hellman = DiffieHellman ( dh_group ) self . Ni = os . urandom ( nonce_len ) self . packets = list ( ) self . state = State . STARTING self . address = address self . peer = peer
:param address: local address tuple(host, port)
        :param peer: remote address tuple(host, port)
        :param dh_group: diffie hellman group number
        :param nonce_len: length of Nonce data