# 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
        # type: (str) -> scapy.fields.Field[Any, Any]
        for k in self.fields_desc:  # type: ignore
            if k.name == attr:
                return k  # type: ignore
        raise AttributeError(attr)

    def __call__(cls,
                 *args,  # type: Any
                 **kargs  # type: Any
                 ):
        # type: (...) -> 'scapy.packet.Packet'
        if "dispatch_hook" in cls.__dict__:
            try:
                cls = cls.dispatch_hook(*args, **kargs)  # type: ignore
            except Exception:
                if config.conf.debug_dissector:
                    raise
                cls = config.conf.raw_layer  # type: ignore
        i = cls.__new__(
            cls,  # type: ignore
            cls.__name__,
            cls.__bases__,
            cls.__dict__
        )
        i.__init__(*args, **kargs)
        return i  # type: ignore


# Note: see compat.py for an explanation


# 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

        # type: (str) -> scapy.fields.Field[Any, Any]
        for k in self.fields_desc:  # type: ignore
            if k.name == attr:
                return k  # type: ignore
        raise AttributeError(attr)

    def __call__(cls,
                 *args,  # type: Any
                 **kargs  # type: Any
                 ):
        # type: (...) -> 'scapy.packet.Packet'
        if "dispatch_hook" in cls.__dict__:
            try:
                cls = cls.dispatch_hook(*args, **kargs)  # type: ignore
            except Exception:
                if config.conf.debug_dissector:
                    raise
                cls = config.conf.raw_layer  # type: ignore
        i = cls.__new__(
            cls,  # type: ignore
            cls.__name__,
            cls.__bases__,
            cls.__dict__
        )
        i.__init__(*args, **kargs)
        return i  # type: ignore


# Note: see compat.py for an explanation


class Field_metaclass(_Generic_metaclass):