示例#1
0
 def decode(self):
     nla.decode(self)
     self['keys'] = []
     nkeys = self['nkeys']
     while nkeys:
         key = self.u32_key(self.buf)
         key.decode()
         self['keys'].append(key)
         nkeys -= 1
示例#2
0
 def decode(self):
     nla.decode(self)
     self['keys'] = []
     nkeys = self['nkeys']
     while nkeys:
         key = self.u32_key(self.buf)
         key.decode()
         self['keys'].append(key)
         nkeys -= 1
示例#3
0
 def decode(self):
     nla.decode(self)
     parms = self.parent.get_attr('TCA_TBF_PARMS') or \
         self.parent.get_attr('TCA_HTB_PARMS') or \
         self.parent.get_attr('TCA_POLICE_TBF')
     if parms is not None:
         rtab = struct.unpack('I' * (len(self['value']) / 4),
                              self['value'])
         self.value = rtab
         setattr(parms, self.__class__.__name__, rtab)
示例#4
0
 def decode(self):
     nla.decode(self)
     parms = self.parent.get_attr('TCA_TBF_PARMS') or \
         self.parent.get_attr('TCA_HTB_PARMS') or \
         self.parent.get_attr('TCA_POLICE_TBF')
     if parms is not None:
         rtab = struct.unpack('I' * (len(self['value']) / 4),
                              self['value'])
         self.value = rtab
         setattr(parms, self.__class__.__name__, rtab)
示例#5
0
文件: ifinfmsg.py 项目: vnvo/pyroute2
 def decode(self):
     nla.decode(self)
     self.value = state_by_code[self["value"]]
示例#6
0
 def decode(self):
     nla.decode(self)
     self['ac_comm'] = self['ac_comm'][:self['ac_comm'].find('\0')]
示例#7
0
 def decode(self):
     nla.decode(self)
     self.value = state_by_code[self['value']]
示例#8
0
 def decode(self):
     nla.decode(self)
     self.value = state_by_code[self['value']]
示例#9
0
 def decode(self):
     nla.decode(self)
     self['ac_comm'] = self['ac_comm'][:self['ac_comm'].find('\0')]