# Path: paramiko/py3compat.py
# def byte_chr(c):
#     assert isinstance(c, int)
#     return struct.pack("B", c)
# 
# PY2 = sys.version_info[0] < 3
# 
# class long(int):
#     pass
# 
# def b(s, encoding="utf8"):  # NOQA
#     """cast unicode or bytes to bytes"""
#     if isinstance(s, str):
#         return s
#     elif isinstance(s, unicode):  # NOQA
#         return s.encode(encoding)
#     elif isinstance(s, buffer):  # NOQA
#         return s
#     else:
#         raise TypeError("Expected unicode or bytes, got {!r}".format(s))


import logging
from paramiko.py3compat import byte_chr, PY2, long, b
    MSG_USERAUTH_REQUEST,
    MSG_USERAUTH_FAILURE,
    MSG_USERAUTH_SUCCESS,
    MSG_USERAUTH_BANNER,
) = range(50, 54)
MSG_USERAUTH_PK_OK = 60
(MSG_USERAUTH_INFO_REQUEST, MSG_USERAUTH_INFO_RESPONSE) = range(60, 62)
(MSG_USERAUTH_GSSAPI_RESPONSE, MSG_USERAUTH_GSSAPI_TOKEN) = range(60, 62)
(
    MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE,
    MSG_USERAUTH_GSSAPI_ERROR,
    MSG_USERAUTH_GSSAPI_ERRTOK,
    MSG_USERAUTH_GSSAPI_MIC,
) = range(63, 67)
HIGHEST_USERAUTH_MESSAGE_ID = 79
(MSG_GLOBAL_REQUEST, MSG_REQUEST_SUCCESS, MSG_REQUEST_FAILURE) = range(80, 83)
(
    MSG_CHANNEL_OPEN,
    MSG_CHANNEL_OPEN_SUCCESS,
    MSG_CHANNEL_OPEN_FAILURE,
    MSG_CHANNEL_WINDOW_ADJUST,
    MSG_CHANNEL_DATA,
    MSG_CHANNEL_EXTENDED_DATA,
    MSG_CHANNEL_EOF,
    MSG_CHANNEL_CLOSE,
    MSG_CHANNEL_REQUEST,
    MSG_CHANNEL_SUCCESS,
    MSG_CHANNEL_FAILURE,
) = range(90, 101)


# Path: paramiko/py3compat.py
# def byte_chr(c):
#     assert isinstance(c, int)
#     return struct.pack("B", c)
# 
# PY2 = sys.version_info[0] < 3
# 
# class long(int):
#     pass
# 
# def b(s, encoding="utf8"):  # NOQA
#     """cast unicode or bytes to bytes"""
#     if isinstance(s, str):
#         return s
#     elif isinstance(s, unicode):  # NOQA
#         return s.encode(encoding)
#     elif isinstance(s, buffer):  # NOQA
#         return s
#     else:
#         raise TypeError("Expected unicode or bytes, got {!r}".format(s))


# Path: paramiko/common.py
import logging
from paramiko.py3compat import byte_chr, PY2, long, b

    MSG_USERAUTH_REQUEST,
    MSG_USERAUTH_FAILURE,
    MSG_USERAUTH_SUCCESS,
    MSG_USERAUTH_BANNER,
) = range(50, 54)
MSG_USERAUTH_PK_OK = 60
(MSG_USERAUTH_INFO_REQUEST, MSG_USERAUTH_INFO_RESPONSE) = range(60, 62)
(MSG_USERAUTH_GSSAPI_RESPONSE, MSG_USERAUTH_GSSAPI_TOKEN) = range(60, 62)
(
    MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE,
    MSG_USERAUTH_GSSAPI_ERROR,
    MSG_USERAUTH_GSSAPI_ERRTOK,
    MSG_USERAUTH_GSSAPI_MIC,
) = range(63, 67)
HIGHEST_USERAUTH_MESSAGE_ID = 79
(MSG_GLOBAL_REQUEST, MSG_REQUEST_SUCCESS, MSG_REQUEST_FAILURE) = range(80, 83)
(
    MSG_CHANNEL_OPEN,
    MSG_CHANNEL_OPEN_SUCCESS,
    MSG_CHANNEL_OPEN_FAILURE,
    MSG_CHANNEL_WINDOW_ADJUST,
    MSG_CHANNEL_DATA,
    MSG_CHANNEL_EXTENDED_DATA,
    MSG_CHANNEL_EOF,
    MSG_CHANNEL_CLOSE,
    MSG_CHANNEL_REQUEST,
    MSG_CHANNEL_SUCCESS,
    MSG_CHANNEL_FAILURE,
) = range(90, 101)


cMSG_DISCONNECT = byte_chr(MSG_DISCONNECT)