• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1## This file is part of Scapy
2## See http://www.secdev.org/projects/scapy for more informations
3## Copyright (C) Philippe Biondi <phil@secdev.org>
4## This program is published under a GPLv2 license
5
6"""
7All layers. Configurable with conf.load_layers.
8"""
9
10from __future__ import absolute_import
11from scapy.config import conf
12from scapy.error import log_loading
13from scapy.main import load_layer
14import logging, importlib
15import scapy.modules.six as six
16ignored = list(six.moves.builtins.__dict__) + ["sys"]
17log = logging.getLogger("scapy.loading")
18
19__all__ = []
20
21for _l in conf.load_layers:
22    log_loading.debug("Loading layer %s" % _l)
23    try:
24        load_layer(_l, globals_dict=globals(), symb_list=__all__)
25    except Exception as e:
26        log.warning("can't import layer %s: %s", _l, e)
27
28del _l
29