---
name: "TnmInet"
section: "3tnm"
platform: "linux"
package: "scotty"
version: "4:00-02-21-2"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/TnmInet"
---

# TnmInet(3tnm)

A Tcl package to use and probe TCP/IP services.

```

```

## NAME

TnmInet - A Tcl package to use and probe TCP/IP services.

```

```

## DESCRIPTION

The TnmInet package provides a set of Tcl command procedures to probe various TCP/IP services. Most of the commands work synchronously which means that they might block the process for a while if there are communication problems. The result of some of the commands is returned in a human readable format which in some cases depends on the software that services requests. The main purpose of these functions is therefore to retrieve information that is displayed in a user-interface and not further processed by software.

## USING THE PACKAGE

The TnmInet package is loaded into a Tcl interpreter by using the  following sequence of Tcl commands:

```
package require Tnm
package require TnmInet $tnm(version)
```

All the TnmInet commands live in the TnmInet namespace. You can import these commands into the current namespace by using the following Tcl command:

```
namespace import TnmInet::*
```

It is however suggested to import commands explicitely or to use the full name in scripts to avoid name clashes.

## COMMANDS

- **TnmInet::GetIpAddress *host***

  The **TnmInet::GetIpAddress** commmand takes a *host* name or a *host* address and returns the *host* address or an error if the *host* is not known in the local network database or in the global Domain Name System (DNS).

- **TnmInet::GetIpName *host***

  The **TnmInet::GetIpName** command takes a *host* name or a *host* address and returns the *host* name or an error if the *host* is not known in the local network database or in the global Domain Name System (DNS).

- **TnmInet::DayTime *host***

  The **TnmInet::DayTime** command connects to the daytime service on *host* and retrieves the local time of day. The command returns the remote system time.

- **TnmInet::Finger *host ?user?***

  The **TnmInet::Finger** command connects to a *host* using the finger user information protocol (RFC 1288).

- **TnmInet::TraceRoute *host ?maxlength? ?retries?***

  The **TnmInet::TraceRoute** command uses the van Jacobsen algorithm to trace a route through the Internet to *host*. It returns the routing trace in formatted, human readable format. The optional *maxlength* and retries parameters set the maximum length of a route and the number of retries for each hop.

- **TnmInet::TcpServices *?host?***

  The **TnmInet::TcpServices** command first reads obtains a list of locally known service names and port numbers. Afterwards, it tries to establish a TCP connection to each port number on *host*. The command returns a formatted, human readable list of TCP services  where the attempt to establish a connection was successful.

- **TnmInet::RpcServices *?host?***

  The **TnmInet::RpcServices** command first obtains the list of ONC RPC services registered at the portmapper on *host*. Afterwards, it probes every listed RPC service by calling RPC procedure 0. The command returns a formatted, human readable list of RPC service together with an indication if the call to procedure 0 was successful. The output also contains the time needed to call procedure 0 for those calls that were successful.

- **TnmInet::SendMail *recipients message ?subject?***

  The **TnmInet::SendMail** command send a mail *message* to a list of *recipients*. The option parameters defines the *subject* of the outgoing *message*. The message is delivered by talking SMTP (RFC 821) to the local mail transfer agent.

  The **TnmInet::SendMail** uses the contents of the global tnm(email) variable in the SMTP From: header line. The global variable tnm(email) is set to "$tnm(user)@$tnm(domain)" if is does not exist.

## SEE ALSO

[scotty(1)](/scotty/1.md), Tnm(n), [Tcl(n)](/Tcl/n.md)

## AUTHORS

Juergen Schoenwaelder \<schoenw@ibr.cs.tu-bs.de\>\
