Search
Filters
Close

OpenTCP( )

=OpenTCP() IP Tools for Excel Sheet Function to open and test TCP connections
 

Check test and evaluate TCP port connections and get status in Excel. Can be used as a TCP port scanner

 

  

OpenTCP( )

Sends a TCP open request packet to the target host or URL/URI on the specified port. Returns results and response time

=OpenTCP(TargetURL, [ReturnType], [Port], [TimeOut])

Arguments

TargetURL Required

May be URL, Host Name or IP Address. A TCP port number may be specified in the URL. Any TargetURL must be resolvable by DNS or host file else the return is #ipte_DNS-NORESOLVE

ReturnType Optional - default is 0

0  TrueFalse = TRUE/FALSE

If a connection can be established with the TargetURL host then TRUE is returned else the return is FALSE

1  Time = time in milliseconds

Time taken in milliseconds to receive the result from the TargetURL. The time for name resolutions is not included in the reported time. If the result fails -1 is returned

99  FailureReason = error reason

Returns a text string describing the error. If there was no error then the string #ipte_NO-ERROR is returned

Port Optional – default is 80

Integer value 1 to 65535. The TCP port number the request will open.

TimeOut Optional – default is 1

Integer value 1 to 25. Timeout value in seconds. The amount of time to wait for the result from the TargetURL before returning a timeout error

Usage Examples

=OpenTCP(“http://www.cisco.com”)

Creates a connection to the host at ww.cisco.com on TCP port 80. Returns TRUE if the open request is successful else FALSE is returned

=OpenTCP(“juniper.net”,1,443)

Creates a connection to the host at juniper.net on TCP port 443 and returns the time taken in milliseconds to receive the results

=OpenTCP("98.138.253.138",99,25,10)

Performs an open port test on the TargetHost 98.138.253.138. TCP port 25 is tested with a TimeOut value of 10 seconds. The return is a string representing an error reason

Notes

Any argument can be a cell reference like A7 or $D$3

Arguments can be entered as “string” or number value

Default timeout value for DNS resolution is 1 second. The request is tried 1 time. If the supplied TargetURL host cannot be resolved #ipte_DNS-NORESOLVE is returned

Top of Page