Lines Matching refs:data
69 def _NlAttr(self, nla_type, data): argument
70 datalen = len(data)
74 return NLAttr((nla_len, nla_type)).Pack() + data + padding
94 def _ParseAttributes(self, command, msg, data): argument
112 while data:
114 nla, data = cstruct.Read(data, NLAttr)
119 nla_data, data = data[:datalen], data[padded_len:]
141 def MaybeDebugCommand(self, command, flags, data): argument
151 data = self.sock.recv(self.BUFSIZE)
153 return data
163 hdr, data = cstruct.Read(response, NLMsgHdr)
165 error = NLMsgErr(data).error
175 def _SendNlRequest(self, command, data, flags): argument
177 length = len(NLMsgHdr) + len(data)
180 self.MaybeDebugCommand(command, flags, nlmsg + data)
183 self._Send(nlmsg + data)
188 def _ParseNLMsg(self, data, msgtype): argument
190 nlmsghdr, data = cstruct.Read(data, NLMsgHdr)
195 return (None, None), data
197 nlmsg, data = cstruct.Read(data, msgtype)
202 attributes = self._ParseAttributes(nlmsghdr.type, nlmsg, data[:attrlen])
203 data = data[attrlen:]
204 return (nlmsg, attributes), data
207 data = self._Recv()
208 if NLMsgHdr(data).type == NLMSG_ERROR:
209 self._ParseAck(data)
210 return self._ParseNLMsg(data, msgtype)[0]
212 def _GetMsgList(self, msgtype, data, expect_done): argument
214 while data:
215 msg, data = self._ParseNLMsg(data, msgtype)
250 data = self._Recv()
251 response_type = NLMsgHdr(data).type
257 self._ParseAck(data)
258 out.extend(self._GetMsgList(msgtype, data, False))