Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/scapy/consts.py: 94%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1# SPDX-License-Identifier: GPL-2.0-only
2# This file is part of Scapy
3# See https://scapy.net/ for more information
4# Copyright (C) Philippe Biondi <phil@secdev.org>
6"""
7This file contains constants
8"""
10from sys import byteorder, platform, maxsize
11import platform as platform_lib
13__all__ = [
14 "LINUX",
15 "OPENBSD",
16 "FREEBSD",
17 "NETBSD",
18 "DARWIN",
19 "SOLARIS",
20 "WINDOWS",
21 "WINDOWS_XP",
22 "BSD",
23 "IS_64BITS",
24 "BIG_ENDIAN",
25]
27LINUX = platform.startswith("linux")
28OPENBSD = platform.startswith("openbsd")
29FREEBSD = "freebsd" in platform
30NETBSD = platform.startswith("netbsd")
31DARWIN = platform.startswith("darwin")
32SOLARIS = platform.startswith("sunos")
33WINDOWS = platform.startswith("win32")
34WINDOWS_XP = platform_lib.release() == "XP"
35BSD = DARWIN or FREEBSD or OPENBSD or NETBSD
36# See https://docs.python.org/3/library/platform.html#cross-platform
37IS_64BITS = maxsize > 2**32
38BIG_ENDIAN = byteorder == 'big'
39# LOOPBACK_NAME moved to conf.loopback_name