MCTUser Manual

mctl(1)

Name

mctl — MCT administration interface

Synopsis

mctl 

[ -e ] [ -i socket ] [ -s session ] [ -I ifname ] [ -n ] [ -p ] [ -u ]
[ -x ] [ -b address ] [ -c address ] [ -w host:lo-hi ]
[ -a address ] [ -d address ] [ -t ttl ]

mctl 

{ -h | -v }

Description

mctl provides a command line interface to control mctd. This exposes the functionality provided by the mct API.

Options are parsed in turn, and executed on-the-fly. Hence certain options have no effect on earlier options, but may affect later options.

Addresses are not specific to any particular protocol family. They are of the form host:service where either the host or the service may be omitted. If the service is omitted, the : (colon) may also be omitted. The host and service may be given in any form acceptable to getaddrinfo, subject to the -n option.

Options

-e

Wait indefinitely for events broadcast from mctd. Each event is printed to stdout. Other options are processed first.

-i socket

IPC path. See mctd.

The default is bp/mctd.

-s session

Add the current session for following options. Implied by -b and -w.

The current open sessions are a set; this set may be cleared by -x.

Valid session IDs correspond to open file descriptors in mctd, which are printed in its logs. These may also be found by using lsof to inspect mctd, or by examining /proc/$pid/fd.

-I ifname

Set the current interface name for following options. Names are given as per if_nametoindex.

The default is to use any interface.

-n

Disable name resolution for following options. This has the effect of permitting addresses in numeric form only.

This is equivalent to the AI_NUMERICHOST and AI_NUMERICSERV flags for getaddrinfo.

-p

Enable passive addresses for following options. This causes the -b address option to include binding to “wildcard addresses”.

This is equivalent to AI_PASSIVE for getaddrinfo.

-u

Set the socket type to SOCK_DGRAM for following options. The default is SOCK_STREAM.

-x

Close all sessions.

-c address

Set the destination address for follow options.

-b address

Bind a session to the given address.

The destination address is as per -c, which must be set previously.

Implies -s.

-w host:lo-hi

Bind to an arbitrary port from within the given range. Successive ports are tried in turn until one is found successful. The host name and port must be suitable for use with getaddrinfo with AI_NUMERICSERV.

The destination address is as per -c, which must be set previously.

Implies -s.

-a address
-d address

Add or drop a multicast group to the current session respectively. The interface used for multicast membership is as per the -I, or any interface if none is given. The address family of the group must match that of the session.

Note for IPv4 and IPv6 the service for the given address is not used.

-f address

Set affinity for outgoing multicast packets for the current session. The interface used for multicast affinity is as per the -I, or the default interface if none is given. The address family of the group must match that of the session.

Note for IPv4 and IPv6 the service for the given address is not used.

-t ttl

Set the TTL (time to live) for outgoing multicast packets for the current session.

A ttl value of -1 sets the route default. Otherwise, the value for ttl may be from 0 to 255 inclusive.

-h

Print a quick reference to these options, and exit.

-v

Print the program version, and exit.

Exit Status

Exits >0 if an error occurs, or 0 on success.

Files

bp/mctd AF_LOCAL abstract space

Default IPC address.

bp/mctl-XXXXXX AF_LOCAL abstract space

See mct.

bp/mcte-XXXXXX AF_LOCAL abstract space

See mct. Only opened if -e is given.

See Also

mctd, mct, unix, getaddrinfo, if_nametoindex.

History

mctl was designed and implemented by Katherine Flavel for Bubblephone Ltd.

Initial development of MCT was funded by 2iC Ltd.