blob: edfc163132b6db415a258075200a4087326374a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#
# This file is part of pysnmp software.
#
# Copyright (c) 2005-2019, Ilya Etingof <etingof@gmail.com>
# License: http://snmplabs.com/pysnmp/license.html
#
import socket
from pysnmp import debug
SYMBOLS = {
'IP_PKTINFO': 8,
'IP_TRANSPARENT': 19,
'SOL_IPV6': 41,
'IPV6_RECVPKTINFO': 49,
'IPV6_PKTINFO': 50,
'IPV6_TRANSPARENT': 75
}
for symbol, value in SYMBOLS.items():
if not hasattr(socket, symbol):
setattr(socket, symbol, value)
debug.logger & debug.FLAG_IO and debug.logger(
'WARNING: the socket module on this platform misses option %s. '
'Assuming its value is %d.' % (symbol, value)
)
|