def parse_next(self, ptype, m):
if self.transport.server_mode and (ptype == MSG_KEXGSS_INIT):<EOL><INDENT>return self._parse_kexgss_init(m)<EOL><DEDENT>elif not self.transport.server_mode and (ptype == MSG_KEXGSS_HOSTKEY):<EOL><INDENT>return self._parse_kexgss_hostkey(m)<EOL><DEDENT>elif self.transport.server_mode and (ptype == MSG_KEXGSS_CONTINUE):<EOL><INDENT>return self._parse_kexgss_continue(m)<EOL><DEDENT>elif not self.transport.server_mode and (ptype == MSG_KEXGSS_COMPLETE):<EOL><INDENT>return self._parse_kexgss_complete(m)<EOL><DEDENT>elif ptype == MSG_KEXGSS_ERROR:<EOL><INDENT>return self._parse_kexgss_error(m)<EOL><DEDENT>msg = "<STR_LIT>"<EOL>raise SSHException(msg.format(ptype))<EOL>
Parse the next packet.

:param ptype: The (string) type of the incoming packet
:param `.Message` m: The paket content