SourceForge Jpcap

net.sourceforge.jpcap.client
Class CaptureConsole

java.lang.Object
  extended by net.ultrametrics.console.TestConsole
      extended by net.sourceforge.jpcap.client.CaptureConsole
All Implemented Interfaces:
com.fooware.util.CommandLineable

public class CaptureConsole
extends net.ultrametrics.console.TestConsole

Text console for controlling packet capture.

Version:
$Revision: 1.1 $
Author:
Patrick Charles and Jonas Lehmann
Last modified by:
$Author: esmondpitt $
Last modified at:
$Date: 2008/08/21 02:58:10 $

Constructor Summary
CaptureConsole(CaptureTool captureTool)
          Construct a new capture console.
 
Method Summary
 String command_capture(String[] args)
          Capture packets.
 String command_clear(String[] args)
          Clear the packet view frame.
 String command_device(String[] args)
          Set the device name.
 String command_filter(String[] args)
          Set the filter expression.
 String command_hclear(String[] args)
          Clear the history buffer.
protected  String command_help(Collection suppressed)
          Generate help for commands specific to this console.
 String command_history(String[] args)
          Show the history buffer contents.
 String command_hsize(String[] args)
          Resize the history buffer.
 String command_mode(String[] args)
          Set the capture mode.
 String command_snaplen(String[] args)
          Set the capture data length.
 String command_status()
          show the status.
 String command_timeout(String[] args)
          Set the capture timeout in ms.
 String command_ui(String[] args)
          Toggle the ui.
 String doCommand(String command, String[] args)
          Command processor.
static void main(String[] args)
          Tester.
 
Methods inherited from class net.ultrametrics.console.TestConsole
command_exec, command_exit, command_gc, command_halt, command_itrace, command_lload, command_memory, command_mtrace, command_properties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CaptureConsole

public CaptureConsole(CaptureTool captureTool)
Construct a new capture console.

Parameters:
captureTool - the capture tool service handle.
Method Detail

doCommand

public String doCommand(String command,
                        String[] args)
Command processor. Handles commands specific to packet capture. Invokes parent to handle commands inherited from other consoles.

Specified by:
doCommand in interface com.fooware.util.CommandLineable
Overrides:
doCommand in class net.ultrametrics.console.TestConsole
Parameters:
command - the command to execute.
args - optional and required arguments to the provided command.

command_capture

public String command_capture(String[] args)
Capture packets.


command_clear

public String command_clear(String[] args)
Clear the packet view frame.


command_device

public String command_device(String[] args)
Set the device name.


command_filter

public String command_filter(String[] args)
Set the filter expression.


command_hclear

public String command_hclear(String[] args)
Clear the history buffer.


command_history

public String command_history(String[] args)
Show the history buffer contents.


command_hsize

public String command_hsize(String[] args)
Resize the history buffer.


command_mode

public String command_mode(String[] args)
Set the capture mode.


command_snaplen

public String command_snaplen(String[] args)
Set the capture data length.


command_status

public String command_status()
show the status.


command_timeout

public String command_timeout(String[] args)
Set the capture timeout in ms.


command_ui

public String command_ui(String[] args)
Toggle the ui.


command_help

protected String command_help(Collection suppressed)
Generate help for commands specific to this console. Invoke parent to give help on commands inherited from other consoles.

Overrides:
command_help in class net.ultrametrics.console.TestConsole
Parameters:
suppressed - a collection of commands handled by child consoles.

main

public static void main(String[] args)
Tester.


Copyright © Patrick Charles & Jonas Lehmann, 2001; Esmond Pitt, 2008.