Lines Matching refs:command
231 def CommandVerb(command): argument
232 return ["NEW", "DEL", "GET", "SET"][command % 4]
235 def CommandSubject(command): argument
236 return ["LINK", "ADDR", "ROUTE", "NEIGH", "RULE"][(command - 16) / 4]
239 def CommandName(command): argument
241 return "RTM_%s%s" % (CommandVerb(command), CommandSubject(command))
243 return "RTM_%d" % command
255 def _Decode(self, command, msg, nla_type, nla_data, nested=0): argument
286 if command == -RTA_METRICS:
288 elif command == -IFLA_LINKINFO:
290 elif command == -IFLA_INFO_DATA:
292 elif CommandSubject(command) == "ADDR":
294 elif CommandSubject(command) == "LINK":
296 elif CommandSubject(command) == "RULE":
298 elif CommandSubject(command) == "ROUTE":
300 elif CommandSubject(command) == "NEIGH":
357 def _SendNlRequest(self, command, data, flags=0): argument
361 if CommandVerb(command) != "GET":
363 if CommandVerb(command) == "NEW":
367 super(IPRoute, self)._SendNlRequest(command, data, flags)
396 command = RTM_NEWRULE if is_add else RTM_DELRULE
397 self._SendNlRequest(command, rtmsg)
438 def CommandToString(self, command, data): argument
440 name = CommandName(command)
441 subject = CommandSubject(command)
454 def MaybeDebugCommand(self, command, unused_flags, data): argument
455 subject = CommandSubject(command)
458 print self.CommandToString(command, data)
484 def _Address(self, version, command, addr, prefixlen, flags, scope, ifindex): argument
491 self._SendNlRequest(command, ifaddrmsg)
561 def _Route(self, version, proto, command, table, dest, prefixlen, nexthop, argument
568 if command == RTM_NEWROUTE and not table:
588 self._SendNlRequest(command, rtmsg)
630 command = RTM_NEWNEIGH if is_add else RTM_DELNEIGH
631 self._SendNlRequest(command, ndmsg, flags)