org.jnetpcap.winpcap
Class WinPcapRmtAuth

java.lang.Object
  extended by org.jnetpcap.winpcap.WinPcapRmtAuth

public final class WinPcapRmtAuth
extends java.lang.Object

Class peered with native pcap_rmtauth structure. Provides authentication data for establishing remote capture and lookup operations using WinPcap extensions.

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Field Summary
static int RMT_AUTH_NULL
          It defines the NULL authentication.
static int RMT_AUTH_PWD
          It defines the username/password authentication.
 
Constructor Summary
WinPcapRmtAuth()
          Allocates an empty authentication object so that it may be setup
WinPcapRmtAuth(int type, java.lang.String username, java.lang.String password)
          Allocates and configures authentication object.
 
Method Summary
 java.lang.String getPassword()
          Gets the string containing the password that has to be used on the remote machine for authentication.
 int getType()
          Gets the type of the authentication required.
 java.lang.String getUsername()
          String containing the username that has to be used on the remote machine for authentication.
 void setPassword(java.lang.String password)
          Sets the string containing the password that has to be used on the remote machine for authentication.
 void setType(int type)
          Type of the authentication required.
 void setUsername(java.lang.String username)
          Sets the string containing the username that has to be used on the remote machine for authentication.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RMT_AUTH_NULL

public static final int RMT_AUTH_NULL
It defines the NULL authentication. This value has to be used within the 'type' member of the pcap_rmtauth structure. The 'NULL' authentication has to be equal to 'zero', so that old applications can just put every field of struct pcap_rmtauth to zero, and it does work.

See Also:
Constant Field Values

RMT_AUTH_PWD

public static final int RMT_AUTH_PWD
It defines the username/password authentication. With this type of authentication, the RPCAP protocol will use the username/ password provided to authenticate the user on the remote machine. If the authentication is successful (and the user has the right to open network devices) the RPCAP connection will continue; otherwise it will be dropped. This value has to be used within the 'type' member of the pcap_rmtauth structure.

See Also:
Constant Field Values
Constructor Detail

WinPcapRmtAuth

public WinPcapRmtAuth()
Allocates an empty authentication object so that it may be setup


WinPcapRmtAuth

public WinPcapRmtAuth(int type,
                      java.lang.String username,
                      java.lang.String password)
Allocates and configures authentication object.

Parameters:
type - authentication type; values of 0 or 1 permitted
username - string containing the username that has to be used on the remote machine for authentication
password - string containing the password that has to be used on the remote machine for authentication
Method Detail

getType

public final int getType()
Gets the type of the authentication required.

Returns:
Type of the authentication required.

setType

public final void setType(int type)
Type of the authentication required.

Parameters:
type - the type to set

getUsername

public final java.lang.String getUsername()
String containing the username that has to be used on the remote machine for authentication.

Returns:
the username

setUsername

public final void setUsername(java.lang.String username)
Sets the string containing the username that has to be used on the remote machine for authentication.

Parameters:
username - the username to set

getPassword

public final java.lang.String getPassword()
Gets the string containing the password that has to be used on the remote machine for authentication.

Returns:
the password

setPassword

public final void setPassword(java.lang.String password)
Sets the string containing the password that has to be used on the remote machine for authentication.

Parameters:
password - the password to set