/usr/share/pyshared/pysnmp/carrier/asynsock/dgram/udp6.py is in python-pysnmp4 4.2.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | # Implements asyncore-based UDP6 transport domain
try:
from socket import AF_INET6
except:
AF_INET6 = None
from pysnmp.carrier.asynsock.dgram.base import DgramSocketTransport
domainName = snmpUDP6Domain = (1, 3, 6, 1, 2, 1, 100, 1, 2)
class Udp6SocketTransport(DgramSocketTransport):
sockFamily = AF_INET6
def normalizeAddress(self, transportAddress):
if '%' in transportAddress[0]: # strip zone ID
return (transportAddress[0].split('%')[0],
transportAddress[1],
0, # flowinfo
0) # scopeid
else:
return (transportAddress[0],
transportAddress[1],
0, # flowinfo
0) # scopeid
Udp6Transport = Udp6SocketTransport
|