?¡ëPNG
IHDR ? f ??C1 sRGB ??¨¦ gAMA ¡À?¨¹a pHYs ? ??o¡§d GIDATx^¨ª¨¹L¡±¡Âe¡ÂY?a?("Bh?_¨°???¡é¡ì?q5k?*:t0A-o??£¤]VkJ¡éM??f?¡À8\k2¨ªll¡ê1]q?¨´???T
Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/user1137782/www/china1.by/classwithtostring.php on line 86
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 213
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 214
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 215
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 216
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 218
'''
Netlink message generation/parsing
Copyright 2007 Johannes Berg
GPLv2
'''
import struct
from netlink import *
CTRL_CMD_UNSPEC = 0
CTRL_CMD_NEWFAMILY = 1
CTRL_CMD_DELFAMILY = 2
CTRL_CMD_GETFAMILY = 3
CTRL_CMD_NEWOPS = 4
CTRL_CMD_DELOPS = 5
CTRL_CMD_GETOPS = 6
CTRL_ATTR_UNSPEC = 0
CTRL_ATTR_FAMILY_ID = 1
CTRL_ATTR_FAMILY_NAME = 2
CTRL_ATTR_VERSION = 3
CTRL_ATTR_HDRSIZE = 4
CTRL_ATTR_MAXATTR = 5
CTRL_ATTR_OPS = 6
class GenlHdr:
def __init__(self, cmd, version = 0):
self.cmd = cmd
self.version = version
def _dump(self):
return struct.pack("BBxx", self.cmd, self.version)
def _genl_hdr_parse(data):
return GenlHdr(*struct.unpack("BBxx", data))
GENL_ID_CTRL = NLMSG_MIN_TYPE
class GeNlMessage(Message):
def __init__(self, family, cmd, attrs=[], flags=0):
self.cmd = cmd
self.attrs = attrs
self.family = family
Message.__init__(self, family, flags=flags, payload=[GenlHdr(self.cmd)]+attrs)
class Controller:
def __init__(self, conn):
self.conn = conn
def get_family_id(self, family):
a = NulStrAttr(CTRL_ATTR_FAMILY_NAME, family)
m = GeNlMessage(GENL_ID_CTRL, CTRL_CMD_GETFAMILY, flags=NLM_F_REQUEST, attrs=[a])
m.send(self.conn)
m = self.conn.recv()
gh = _genl_hdr_parse(m.payload[:4])
attrs = parse_attributes(m.payload[4:])
return attrs[CTRL_ATTR_FAMILY_ID].u16()
connection = Connection(NETLINK_GENERIC)
controller = Controller(connection)