parameters: (interface, port)
docstring: Redirects packets coming to a specified port into the constrained class.
  
    Args:
      interface: Interface name to attach the filter to (string).
      port: Port number to filter packets with (integer 1-65535).
docstring_summary: Redirects packets coming to a specified port into the constrained class.
docstring_tokens: Redirects packets coming to a specified port into the constrained class .
function: def _AddFilter(interface, port):
    """Redirects packets coming to a specified port into the constrained class.
  
    Args:
      interface: Interface name to attach the filter to (string).
      port: Port number to filter packets with (integer 1-65535).
    """
    class_id = '1:%x' % port
  
    command = ['sudo', 'tc', 'filter', 'add', 'dev', interface, 'protocol', 'ip',
               'parent', '1:', 'prio', '1', 'u32', 'match', 'ip', 'sport', port,
               '0xffff', 'flowid', class_id]
    _Exec(command, msg='Error adding filter on port %d.' % port)
function_tokens: def _AddFilter ( interface , port ) : class_id = '1:%x' % port command = [ 'sudo' , 'tc' , 'filter' , 'add' , 'dev' , interface , 'protocol' , 'ip' , 'parent' , '1:' , 'prio' , '1' , 'u32' , 'match' , 'ip' , 'sport' , port , '0xffff' , 'flowid' , class_id ] _Exec ( command , msg = 'Error adding filter on port %d.' % port )