parameters: (self, bandwidth_kbps, delay_ms, packet_loss_percent,
                              queue_slots)
return_statement: return self._pipe_counter
docstring: Creates a Dummynet pipe and return its ID.
  
      Args:
          bandwidth_kbps: Bandwidth.
          delay_ms: Delay for a one-way trip of a packet.
          packet_loss_percent: Float value of packet loss, in percent.
          queue_slots: Size of the queue.
      Returns:
          The ID of the pipe, starting at 1.
docstring_summary: Creates a Dummynet pipe and return its ID.
docstring_tokens: Creates a Dummynet pipe and return its ID .
function: def _create_dummynet_pipe(self, bandwidth_kbps, delay_ms, packet_loss_percent,
                              queue_slots):
      """Creates a Dummynet pipe and return its ID.
  
      Args:
          bandwidth_kbps: Bandwidth.
          delay_ms: Delay for a one-way trip of a packet.
          packet_loss_percent: Float value of packet loss, in percent.
          queue_slots: Size of the queue.
      Returns:
          The ID of the pipe, starting at 1.
      """
      self._pipe_counter += 1
      cmd = ['pipe', self._pipe_counter, 'config',
             'bw', str(bandwidth_kbps/8) + 'KByte/s',
             'delay', '%sms' % delay_ms,
             'plr', (packet_loss_percent/100.0),
             'queue', queue_slots]
      error_message = 'Failed to create Dummynet pipe. '
      if sys.platform.startswith('linux'):
        error_message += ('Make sure you have loaded the ipfw_mod.ko module to '
                          'your kernel (sudo insmod /path/to/ipfw_mod.ko).')
      _run_ipfw_command(cmd, error_message)
      return self._pipe_counter
function_tokens: def _create_dummynet_pipe ( self , bandwidth_kbps , delay_ms , packet_loss_percent , queue_slots ) : self . _pipe_counter += 1 cmd = [ 'pipe' , self . _pipe_counter , 'config' , 'bw' , str ( bandwidth_kbps / 8 ) + 'KByte/s' , 'delay' , '%sms' % delay_ms , 'plr' , ( packet_loss_percent / 100.0 ) , 'queue' , queue_slots ] error_message = 'Failed to create Dummynet pipe. ' if sys . platform . startswith ( 'linux' ) : error_message += ( 'Make sure you have loaded the ipfw_mod.ko module to ' 'your kernel (sudo insmod /path/to/ipfw_mod.ko).' ) _run_ipfw_command ( cmd , error_message ) return self . _pipe_counter