Class sfclasses.Rule
All Packages Class Hierarchy This Package Previous Next Index
Class sfclasses.Rule
java.lang.Object
|
+----sfclasses.Rule
- public class Rule
- extends Object
- implements Persistent
Filter configuration rule
Objects of this class contain the complete information about one
filter rule. They are used to store the data for displaying the
active configuration of a firewall and to store the global configuration
data.
-
active
-
-
bytes
-
-
changed
-
-
comment
-
-
FW_ACCEPT
-
-
FW_BLOCK
-
-
fw_dst_cnt
-
-
fw_dst_idx
- Address information
positive: index to address array
zero: any addresses
-1..-4: special values for dynamic rules
<=-100: address macro number
-
fw_flags
-
-
fw_line
-
-
fw_rc
-
-
FW_REJECT
-
-
fw_rip_cnt
-
-
fw_rip_idx
- Address information
positive: index to address array
zero: any addresses
-1..-4: special values for dynamic rules
<=-100: address macro number
-
fw_src_cnt
-
-
fw_src_idx
- Address information
positive: index to address array
zero: any addresses
-1..-4: special values for dynamic rules
<=-100: address macro number
-
GIGA
-
-
icmptype
-
-
IPPROTO_ICMP
-
-
IPPROTO_IGMP
-
-
IPPROTO_TCP
-
-
IPPROTO_UDP
-
-
KILO
-
-
level_num
-
-
MAX_PROTOCOL
-
-
MEGA
-
-
priority
-
-
protocol
-
-
protocols
-
-
SF_CHECK_SEQUENCE
-
-
SF_DESTHOST
-
-
SF_DESTNET
-
-
SF_FIRSTMACRO
-
-
SF_FIRSTMACRO_ABS
-
-
SF_FTP_DATA_LOG
-
-
SF_FTP_NO_ACTIVE
-
-
SF_FTP_NO_PASSIVE
-
-
SF_FW_CHECK_OPT
-
-
SF_FW_CHECK_PROTOCOL
-
-
SF_FW_CHECK_TTL
-
-
SF_FW_DST_NEG
-
-
SF_FW_LOG
-
-
SF_FW_OPT_LSR
-
-
SF_FW_OPT_RR
-
-
SF_FW_OPT_SATID
-
-
SF_FW_OPT_SEC
-
-
SF_FW_OPT_SSR
-
-
SF_FW_OPT_TS
-
-
SF_FW_PROT
-
-
SF_FW_PROT_ALL
-
-
SF_FW_PROT_CURRENT
-
-
SF_FW_PROT_RIP
-
-
SF_FW_SRC_NEG
-
-
SF_FW_TTL
-
-
SF_FW_TTL_EQUAL
-
-
SF_FW_TTL_GREATER
-
-
SF_FW_TTL_LESS
-
-
SF_FW_TTL_NOTEQUAL
-
-
SF_ICMP_ADDRESS
-
-
SF_ICMP_ADDRESSREPLY
-
-
SF_ICMP_ALLTYPES
-
-
SF_ICMP_DEST_UNREACH
-
-
SF_ICMP_ECHO
-
-
SF_ICMP_ECHOREPLY
-
-
SF_ICMP_INFO_REPLY
-
-
SF_ICMP_INFO_REQUEST
-
-
SF_ICMP_PARAMETERPROB
-
-
SF_ICMP_REDIRECT
-
-
SF_ICMP_SOURCE_QUENCH
-
-
SF_ICMP_TIME_EXCEEDED
-
-
SF_ICMP_TIMESTAMP
-
-
SF_ICMP_TIMESTAMPREPLY
-
-
SF_IGMP_ALLTYPES
-
-
SF_IGMP_HOST_LEAVE_MESSAGE
-
-
SF_IGMP_HOST_MEMBERSHIP_QUERY
-
-
SF_IGMP_HOST_MEMBERSHIP_REPORT
-
-
SF_RC_BEST
-
-
SF_RC_ECHO
-
-
SF_RC_OBSERVE
-
-
SF_RC_RNET
-
-
SF_RC_RPORT
-
-
SF_RC_RPROTO
-
-
SF_RC_TREJECT
-
-
SF_RIP_ADDR_NEG
-
-
SF_RULE_CONNECTION
-
-
SF_RULE_OVERSIZED
-
-
SF_RULE_SPOOFING
-
-
SF_RULE_STATIC
-
-
SF_SOURCEHOST
-
-
SF_SOURCENET
-
-
SF_TIMEOUT_VALID
-
-
SF_TYPE_MASK
-
-
subID
-
-
templateID
-
-
timeout
-
-
timeout_type
-
-
ttl
-
-
usage
-
-
validFor
-
-
warn
-
-
Rule()
- Initialize an empty rule object.
-
Rule(Rule, int, int)
- Initialize the rule with data from a template.
-
editDialog(Frame, ManageDomain, Refreshable, boolean)
- Bring up a dialog box for editing the rule.
-
getString(int, Host, ManageDomain)
- Return the text to be displayed for the rule in the rule panel.
-
printRule(PrintStream, ManageDomain, Host)
- Print the rule in configuration file format.
-
read(PersistentInputStream)
- Read object data from a persistent input stream
-
write(PersistentOutputStream)
- Write object data to a persistent output stream
templateID
protected int templateID
subID
protected int subID
active
protected boolean active
changed
protected boolean changed
warn
protected boolean warn
priority
protected boolean priority
validFor
protected boolean validFor[]
comment
protected String comment
fw_line
protected int fw_line
level_num
protected int level_num
SF_TIMEOUT_VALID
protected final static int SF_TIMEOUT_VALID
SF_RULE_CONNECTION
protected final static int SF_RULE_CONNECTION
SF_RULE_STATIC
protected final static int SF_RULE_STATIC
SF_RULE_SPOOFING
protected final static int SF_RULE_SPOOFING
SF_RULE_OVERSIZED
protected final static int SF_RULE_OVERSIZED
timeout_type
protected int timeout_type
timeout
protected Date timeout
fw_rc
protected int fw_rc
SF_RC_BEST
protected final static int SF_RC_BEST
SF_RC_TREJECT
protected final static int SF_RC_TREJECT
SF_RC_ECHO
protected final static int SF_RC_ECHO
SF_RC_OBSERVE
protected final static int SF_RC_OBSERVE
FW_BLOCK
protected final static int FW_BLOCK
FW_ACCEPT
protected final static int FW_ACCEPT
FW_REJECT
protected final static int FW_REJECT
SF_RC_RNET
protected final static int SF_RC_RNET
SF_RC_RPROTO
protected final static int SF_RC_RPROTO
SF_RC_RPORT
protected final static int SF_RC_RPORT
fw_src_idx
protected int fw_src_idx
- Address information
positive: index to address array
zero: any addresses
-1..-4: special values for dynamic rules
<=-100: address macro number
fw_src_cnt
protected int fw_src_cnt
fw_dst_idx
protected int fw_dst_idx
- Address information
positive: index to address array
zero: any addresses
-1..-4: special values for dynamic rules
<=-100: address macro number
fw_dst_cnt
protected int fw_dst_cnt
SF_SOURCEHOST
protected final static int SF_SOURCEHOST
SF_SOURCENET
protected final static int SF_SOURCENET
SF_DESTHOST
protected final static int SF_DESTHOST
SF_DESTNET
protected final static int SF_DESTNET
SF_FIRSTMACRO
protected final static int SF_FIRSTMACRO
SF_FIRSTMACRO_ABS
protected final static int SF_FIRSTMACRO_ABS
fw_flags
protected int fw_flags
ttl
protected int ttl
protocol
protected int protocol
IPPROTO_ICMP
protected final static int IPPROTO_ICMP
IPPROTO_IGMP
protected final static int IPPROTO_IGMP
IPPROTO_TCP
protected final static int IPPROTO_TCP
IPPROTO_UDP
protected final static int IPPROTO_UDP
fw_rip_idx
protected int fw_rip_idx
- Address information
positive: index to address array
zero: any addresses
-1..-4: special values for dynamic rules
<=-100: address macro number
fw_rip_cnt
protected int fw_rip_cnt
usage
protected int usage
bytes
protected long bytes
GIGA
protected final static long GIGA
MEGA
protected final static long MEGA
KILO
protected final static long KILO
SF_FW_LOG
protected final static int SF_FW_LOG
SF_FW_CHECK_TTL
protected final static int SF_FW_CHECK_TTL
SF_FW_TTL
protected final static int SF_FW_TTL
SF_FW_TTL_EQUAL
protected final static int SF_FW_TTL_EQUAL
SF_FW_TTL_LESS
protected final static int SF_FW_TTL_LESS
SF_FW_TTL_GREATER
protected final static int SF_FW_TTL_GREATER
SF_FW_TTL_NOTEQUAL
protected final static int SF_FW_TTL_NOTEQUAL
SF_FW_SRC_NEG
protected final static int SF_FW_SRC_NEG
SF_FW_DST_NEG
protected final static int SF_FW_DST_NEG
SF_FW_CHECK_OPT
protected final static int SF_FW_CHECK_OPT
SF_FW_OPT_RR
protected final static int SF_FW_OPT_RR
SF_FW_OPT_TS
protected final static int SF_FW_OPT_TS
SF_FW_OPT_SEC
protected final static int SF_FW_OPT_SEC
SF_FW_OPT_LSR
protected final static int SF_FW_OPT_LSR
SF_FW_OPT_SSR
protected final static int SF_FW_OPT_SSR
SF_FW_OPT_SATID
protected final static int SF_FW_OPT_SATID
SF_FW_PROT
protected final static int SF_FW_PROT
SF_FW_PROT_ALL
protected final static int SF_FW_PROT_ALL
SF_FW_PROT_RIP
protected final static int SF_FW_PROT_RIP
SF_FW_CHECK_PROTOCOL
protected final static int SF_FW_CHECK_PROTOCOL
SF_FW_PROT_CURRENT
protected final static int SF_FW_PROT_CURRENT
SF_TYPE_MASK
protected final static int SF_TYPE_MASK
SF_FTP_DATA_LOG
protected final static int SF_FTP_DATA_LOG
SF_FTP_NO_ACTIVE
protected final static int SF_FTP_NO_ACTIVE
SF_FTP_NO_PASSIVE
protected final static int SF_FTP_NO_PASSIVE
SF_CHECK_SEQUENCE
protected final static int SF_CHECK_SEQUENCE
SF_ICMP_ALLTYPES
protected final static int SF_ICMP_ALLTYPES
SF_ICMP_ECHOREPLY
protected final static int SF_ICMP_ECHOREPLY
SF_ICMP_DEST_UNREACH
protected final static int SF_ICMP_DEST_UNREACH
SF_ICMP_SOURCE_QUENCH
protected final static int SF_ICMP_SOURCE_QUENCH
SF_ICMP_REDIRECT
protected final static int SF_ICMP_REDIRECT
SF_ICMP_ECHO
protected final static int SF_ICMP_ECHO
SF_ICMP_TIME_EXCEEDED
protected final static int SF_ICMP_TIME_EXCEEDED
SF_ICMP_PARAMETERPROB
protected final static int SF_ICMP_PARAMETERPROB
SF_ICMP_TIMESTAMP
protected final static int SF_ICMP_TIMESTAMP
SF_ICMP_TIMESTAMPREPLY
protected final static int SF_ICMP_TIMESTAMPREPLY
SF_ICMP_INFO_REQUEST
protected final static int SF_ICMP_INFO_REQUEST
SF_ICMP_INFO_REPLY
protected final static int SF_ICMP_INFO_REPLY
SF_ICMP_ADDRESS
protected final static int SF_ICMP_ADDRESS
SF_ICMP_ADDRESSREPLY
protected final static int SF_ICMP_ADDRESSREPLY
SF_IGMP_ALLTYPES
protected final static int SF_IGMP_ALLTYPES
SF_IGMP_HOST_MEMBERSHIP_QUERY
protected final static int SF_IGMP_HOST_MEMBERSHIP_QUERY
SF_IGMP_HOST_MEMBERSHIP_REPORT
protected final static int SF_IGMP_HOST_MEMBERSHIP_REPORT
SF_IGMP_HOST_LEAVE_MESSAGE
protected final static int SF_IGMP_HOST_LEAVE_MESSAGE
SF_RIP_ADDR_NEG
protected final static int SF_RIP_ADDR_NEG
MAX_PROTOCOL
protected final static int MAX_PROTOCOL
protocols
protected final static String protocols[]
icmptype
protected final static String icmptype[]
Rule
public Rule()
- Initialize an empty rule object. This constructor is used by the
persistence methods.
Rule
public Rule(Rule oldrule,
int tID,
int sID)
- Initialize the rule with data from a template. This is used for
autoconfiguration.
- Parameters:
- oldrule - Previously generated rule from same template or null.
If oldrule is not null, the active, changed, and warn fields of the
new rule are initialized according to the old rule.
- tID - template ID
- sID - sub ID. More than one rule can be generated from a server
template. The sub ID is either 0 (for non-server templates) or
2 * hierarchy level - 1 for server templates.
editDialog
public void editDialog(Frame parent,
ManageDomain mgDomain,
Refreshable rp,
boolean newRule)
- Bring up a dialog box for editing the rule.
- Parameters:
- parent - Parent frame
- mgDomain - Manage domain object holding the global configuration data.
- rp - Calling frame that will be notified when the dialog closes
- newRule - If true the rule will be deleted from the rule vector
when the user selects cancel.
getString
public String[] getString(int column,
Host firewall,
ManageDomain mgDomain)
- Return the text to be displayed for the rule in the rule panel.
- Parameters:
- column - Number of the rule panel column.
- firewall - When displaying the active rules of a firewall, this
parameter contains the corresponding firewall, otherwise null.
- mgDomain - Manage domain object holding the global configuration data.
- Returns:
- Array of strings for each line to display.
printRule
public void printRule(PrintStream ps,
ManageDomain mgDomain,
Host host)
- Print the rule in configuration file format. This method is called when
generating a configuration file for a firewall.
- Parameters:
- ps - Stream to write the output to
- mgDomain - Manage domain object holding the global configuration data.
- host - Firewall the configuration file is generated for
write
public void write(PersistentOutputStream ps)
- Write object data to a persistent output stream
- Parameters:
- ps - Stream
- See Also:
- PersistentOutputStream
read
public void read(PersistentInputStream ps) throws IOException
- Read object data from a persistent input stream
- Parameters:
- ps - Stream
- See Also:
- PersistentInputStream
All Packages Class Hierarchy This Package Previous Next Index