connect info

Description

This command returns a Tcl list of the specified information about an established sideband connection. It is one of several commands that make up the ability to create sideband connections from iRules.

Syntax

connect info [-myport] [-myaddr] [-local] [-remote] [-tos] [-idle] [-status] <connection>

Returns a TCL list of the requested information. The specified options, except for

-status

, return information derived from the parameters used from the original connect command, not the current state of the connection. That is,

-idle
will not return how long the connection has been idle, but will return the specified idle time based on the call to connect (or the default, if it was not specified).
If
-status
is specified, the result will include a TCL list of three elements:
  1. The overall sideband connection status
  2. The send status
  3. The receive status

The list of results from the
connect info
command is returned in the same order the arguments are specified.
That is, given these two examples:
log local0. "Result A: [connect info -idle -status $conn]"
log local0. "Result B: [connect info -status -idle $conn]"
The log output might look something like:
<HTTP_REQUEST>: Result A: {connected idle idle} 60
<HTTP_REQUEST>: Result B: 60 {connected idle idle}

Arguments

Refer to connect for documentation on the meaning of

-myport

,

-myaddr

,

-tos

, and

-idle

  • -local
    

    will return a TCL list of the local address and port; if the original call to connect did not specify

    -myaddr
    

    and

    -myport
    

    , it will return

    {:: 0}
    


  • -remote
    
    will return a TCL list of the remote (server) address and port

  • -status
    

    will return a TCL list of three elements:

  • The overall connection status

  • The “send” status

  • The “receive” status


Examples

# Get the connection info for a previously established sideband connection
set conn_info [connect info -idle -status $conn]
log local0. "Connect info: $conn_info"