def decode(self): nlmsg.decode(self) if self[self.ffname] == AF_INET: self['idiag_dst'] = inet_ntop(AF_INET, pack('>I', self['idiag_dst'][0])) self['idiag_src'] = inet_ntop(AF_INET, pack('>I', self['idiag_src'][0])) elif self[self.ffname] == AF_INET6: self['idiag_dst'] = inet_ntop(AF_INET6, pack('>IIII', *self['idiag_dst'])) self['idiag_src'] = inet_ntop(AF_INET6, pack('>IIII', *self['idiag_src']))
def decode(self): nlmsg.decode(self) if self[self.ffname] == AF_INET: self['idiag_dst'] = inet_ntop(AF_INET, pack('>I', self['idiag_dst'][0])) self['idiag_src'] = inet_ntop(AF_INET, pack('>I', self['idiag_src'][0])) elif self[self.ffname] == AF_INET6: self['idiag_dst'] = inet_ntop(AF_INET6, pack('>IIII', *self['idiag_dst'])) self['idiag_src'] = inet_ntop(AF_INET6, pack('>IIII', *self['idiag_src']))
def decode(self): nlmsg.decode(self) if self['flags'] & 1: self['state'] = 'up' else: self['state'] = 'down'
def decode(self): nlmsg.decode(self) self['payload'] = self.buf.read(self['data_len'])
def decode(self): nlmsg.decode(self) self['payload'] = self.buf.read(self['data_len'])
def decode(self): nlmsg.decode(self) if self['flags'] & 1: self['state'] = 'up' else: self['state'] = 'down'