Fortinet white logo
Fortinet white logo

Script Reference Guide

PROXY:shared_table_destroy()

PROXY:shared_table_destroy()

Destroys the specified shared table and all the data entries if the calling process is the only one attached to the shared table. In case there is more than one process attached to this table, this function will only detach both the data entries and the shared table for the calling process.
Returns Boolean true if successful, otherwise, returns Boolean false.

Syntax

PROXY:shared_table_destroy(table_name);

Arguments

Name Description
table_name

A Lua string as the name of the shared table. This is the unique identification of a shared table. This parameter is mandatory.

The maximum length of this table name is 255.

Events

Applicable in the following events:

  • RULE_INIT

  • HTTP events: HTTP_REQUEST, HTTP_RESPONSE, HTTP_DATA_REQUEST, HTTP_DATA_RESPONSE, BEFORE_AUTH, AUTH_RESULT, COOKIE_BAKE

  • SSL events: CLIENTSSL_HANDSHAKE, SERVERSSL_HANDSHAKE, CLIENTSSL_RENEGOTIATE, SERVERSSL_RENEGOTIATE

  • TCP events: TCP_ACCEPTED, TCP_CLOSED, SERVER_CONNECTED, SERVER_CLOSED, VS_LISTENER_BIND, SERVER_BEFORE_CONNECT

  • WAF events: WAF_REQUEST_BEFORE_SCAN, WAF_RESPONSE_BEFORE_SCAN, WAF_REQUEST_ATTACK_DETECTED, WAF_RESPONSE_ATTACK_DETECTED

Example

when HTTP_REQUEST { 
	table_name = "TableDemo1" 
	ret = PROXY:shared_table_destroy(table_name) 
	if ret then 
	   debug("===>>shared_table_destroy success: [%s]\n", table_name) 
	else 
	   debug("===>>shared_table_destroy failed: [%s]\n", table_name) 
	end 
} 

Supported Version

FortiADC version 7.4.2 and later.

PROXY:shared_table_destroy()

PROXY:shared_table_destroy()

Destroys the specified shared table and all the data entries if the calling process is the only one attached to the shared table. In case there is more than one process attached to this table, this function will only detach both the data entries and the shared table for the calling process.
Returns Boolean true if successful, otherwise, returns Boolean false.

Syntax

PROXY:shared_table_destroy(table_name);

Arguments

Name Description
table_name

A Lua string as the name of the shared table. This is the unique identification of a shared table. This parameter is mandatory.

The maximum length of this table name is 255.

Events

Applicable in the following events:

  • RULE_INIT

  • HTTP events: HTTP_REQUEST, HTTP_RESPONSE, HTTP_DATA_REQUEST, HTTP_DATA_RESPONSE, BEFORE_AUTH, AUTH_RESULT, COOKIE_BAKE

  • SSL events: CLIENTSSL_HANDSHAKE, SERVERSSL_HANDSHAKE, CLIENTSSL_RENEGOTIATE, SERVERSSL_RENEGOTIATE

  • TCP events: TCP_ACCEPTED, TCP_CLOSED, SERVER_CONNECTED, SERVER_CLOSED, VS_LISTENER_BIND, SERVER_BEFORE_CONNECT

  • WAF events: WAF_REQUEST_BEFORE_SCAN, WAF_RESPONSE_BEFORE_SCAN, WAF_REQUEST_ATTACK_DETECTED, WAF_RESPONSE_ATTACK_DETECTED

Example

when HTTP_REQUEST { 
	table_name = "TableDemo1" 
	ret = PROXY:shared_table_destroy(table_name) 
	if ret then 
	   debug("===>>shared_table_destroy success: [%s]\n", table_name) 
	else 
	   debug("===>>shared_table_destroy failed: [%s]\n", table_name) 
	end 
} 

Supported Version

FortiADC version 7.4.2 and later.