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 scapy.config import conf
11from scapy.error import log_loading
12import logging
13log = logging.getLogger("scapy.loading")
14
15def _import_star(m):
16    mod = __import__(m, globals(), locals())
17    for k,v in mod.__dict__.iteritems():
18        globals()[k] = v
19
20# TBD-hhaim limit the number of layers
21#conf.load_layers
22#'inet6'
23for _l in ['l2','inet','inet6']:
24    log_loading.debug("Loading layer %s" % _l)
25    #print "load  ",_l
26    _import_star(_l)
27    #try:
28    #    _import_star(_l)
29    #except Exception,e:
30	#log.warning("can't import layer %s: %s" % (_l,e))
31
32
33
34
35