def cycle_interface(self, increment=<NUM_LIT:1>):
interfaces = [i for i in netifaces.interfaces() if i not in self.ignore_interfaces]<EOL>if self.interface in interfaces:<EOL><INDENT>next_index = (interfaces.index(self.interface) + increment) % len(interfaces)<EOL>self.interface = interfaces[next_index]<EOL><DEDENT>elif len(interfaces) > <NUM_LIT:0>:<EOL><INDENT>self.interface = interfaces[<NUM_LIT:0>]<EOL><DEDENT>if self.network_traffic:<EOL><INDENT>self.network_traffic.clear_counters()<EOL>self.kbs_arr = [<NUM_LIT:0.0>] * self.graph_width<EOL><DEDENT>
Cycle through available interfaces in `increment` steps. Sign indicates direction.