# Path: scapy/compat.py
#     FAKE_TYPING = False
#     FAKE_TYPING = True
#     TYPE_CHECKING = False
#     IO = _FakeType("IO")  # type: ignore
#         AF_INET = socket.AF_INET
#         AF_INET6 = socket.AF_INET6
# class _Generic_metaclass(type):
#     class _FT(object):
#     class Sized(object):  # type: ignore
#     class Generic(object):  # type: ignore
#         class _NT(cls):
#     class AddressFamily:
#         def __getitem__(self, typ):
# def _FakeType(name, cls=object):
#         def __init__(self, name):
#         def __getitem__(self, item):  # type: ignore
#         def __call__(self, *args, **kargs):
#         def __repr__(self):
#     def cast(_type, obj):  # type: ignore
#     def _unpickleNamedTuple(name, len_params, *args):
#     def NamedTuple(name, params):
#             def __reduce__(self):
# def lambda_tuple_converter(func):
#     def chb(x):
#     def raw(x):
#     def raw(x):
#     def bytes_encode(x):
#         def plain_str(x):
#         def plain_str(x):
#     def chb(x):
#     def orb(x):
# def bytes_hex(x):
# def hex_bytes(x):
#     def int_bytes(x, size):
#     def bytes_int(x):
#     def int_bytes(x, size):
#     def bytes_int(x):
# def base64_bytes(x):
# def bytes_base64(x):
#     def gzip_decompress(x):
#     def gzip_compress(x):


from functools import reduce
from scapy.error import Scapy_Exception
from scapy.consts import WINDOWS
from scapy.modules.six.moves import range
from scapy.compat import (
    Any,
    Dict,
    Generic,
    Iterator,
    List,
    Optional,
    Tuple,
    Type,
    TypeVar,
    Union,
    _Generic_metaclass,
    cast,
)
            from scapy import config
                from scapy import config
        from scapy.config import conf
        from scapy.utils import get_temp_file, ContextManagerSubprocess
        from scapy.config import conf
        from scapy.utils import get_temp_file, ContextManagerSubprocess
        from scapy.config import conf
        from scapy.utils import get_temp_file, ContextManagerSubprocess
import operator
import os
import random
import re
import socket
import struct
import subprocess
import types
import warnings
import scapy
    import pyx
            import inspect
                    )
                    warnings.warn(war_msg, SyntaxWarning)
                names.append(f.name)
                if f.name in dct:
                    f = f.copy()
                    f.default = dct[f.name]
                    del(dct[f.name])
                final_fld.append(f)

            dct["fields_desc"] = final_fld

        dct.setdefault("__slots__", [])
        for attr in ["name", "overload_fields"]:
            try:
                dct["_%s" % attr] = dct.pop(attr)
            except KeyError:
                pass
        # Build and inject signature
        try:
            # Py3 only
            dct["__signature__"] = inspect.Signature([
                inspect.Parameter("_pkt", inspect.Parameter.POSITIONAL_ONLY),
            ] + [
                inspect.Parameter(f.name,
                                  inspect.Parameter.KEYWORD_ONLY,
                                  default=f.default)
                for f in dct["fields_desc"]
            ])
        except (ImportError, AttributeError, KeyError):
            pass

# Path: scapy/compat.py
#     FAKE_TYPING = False
#     FAKE_TYPING = True
#     TYPE_CHECKING = False
#     IO = _FakeType("IO")  # type: ignore
#         AF_INET = socket.AF_INET
#         AF_INET6 = socket.AF_INET6
# class _Generic_metaclass(type):
#     class _FT(object):
#     class Sized(object):  # type: ignore
#     class Generic(object):  # type: ignore
#         class _NT(cls):
#     class AddressFamily:
#         def __getitem__(self, typ):
# def _FakeType(name, cls=object):
#         def __init__(self, name):
#         def __getitem__(self, item):  # type: ignore
#         def __call__(self, *args, **kargs):
#         def __repr__(self):
#     def cast(_type, obj):  # type: ignore
#     def _unpickleNamedTuple(name, len_params, *args):
#     def NamedTuple(name, params):
#             def __reduce__(self):
# def lambda_tuple_converter(func):
#     def chb(x):
#     def raw(x):
#     def raw(x):
#     def bytes_encode(x):
#         def plain_str(x):
#         def plain_str(x):
#     def chb(x):
#     def orb(x):
# def bytes_hex(x):
# def hex_bytes(x):
#     def int_bytes(x, size):
#     def bytes_int(x):
#     def int_bytes(x, size):
#     def bytes_int(x):
# def base64_bytes(x):
# def bytes_base64(x):
#     def gzip_decompress(x):
#     def gzip_compress(x):


# Path: scapy/base_classes.py
from functools import reduce
from scapy.error import Scapy_Exception
from scapy.consts import WINDOWS
from scapy.modules.six.moves import range
from scapy.compat import (
    Any,
    Dict,
    Generic,
    Iterator,
    List,
    Optional,
    Tuple,
    Type,
    TypeVar,
    Union,
    _Generic_metaclass,
    cast,
)
            from scapy import config
                from scapy import config
        from scapy.config import conf
        from scapy.utils import get_temp_file, ContextManagerSubprocess
        from scapy.config import conf
        from scapy.utils import get_temp_file, ContextManagerSubprocess
        from scapy.config import conf
        from scapy.utils import get_temp_file, ContextManagerSubprocess
import operator
import os
import random
import re
import socket
import struct
import subprocess
import types
import warnings
import scapy
    import pyx
            import inspect

                    )
                    warnings.warn(war_msg, SyntaxWarning)
                names.append(f.name)
                if f.name in dct:
                    f = f.copy()
                    f.default = dct[f.name]
                    del(dct[f.name])
                final_fld.append(f)

            dct["fields_desc"] = final_fld

        dct.setdefault("__slots__", [])
        for attr in ["name", "overload_fields"]:
            try:
                dct["_%s" % attr] = dct.pop(attr)
            except KeyError:
                pass
        # Build and inject signature
        try:
            # Py3 only
            dct["__signature__"] = inspect.Signature([
                inspect.Parameter("_pkt", inspect.Parameter.POSITIONAL_ONLY),
            ] + [
                inspect.Parameter(f.name,
                                  inspect.Parameter.KEYWORD_ONLY,
                                  default=f.default)
                for f in dct["fields_desc"]
            ])
        except (ImportError, AttributeError, KeyError):
            pass

        newcls = cast('Type[scapy.packet.Packet]',