BWC::policy

Description

This command allows a previously defined BWC policy to be attached or detached from the flow. Static policies do not take the session id parameter. Dynamic policies require a session id for the flow. A common session id would be comprised of IP::remote_addr + TCP::remote_port, but as long as it is unique, it can be anything.

Syntax

BWC::policy attach <policy name> [session id]
BWC::policy detach <policy name> [session id]

BWC::policy attach <policy name> [session id]

  • Attach the specified policy and if dynamic, attach to the specified session id.

BWC::policy detach <policy name> [session id]

  • Detach the specified policy and if dynamic, detach from the specified session id.

Examples

if { [HTTP::path] ends_with ".mp4" } {
  BWC::policy attach Video_Policy
}