Api command line options – Thinklogical Router - Configuring the ASCII Interface User Manual

Page 3

Advertising
background image

API Command Line Options

Each model router has it's own API program. Examples are:

vx40api

,

vx160api

,

mx48api

and

vx320api. The generic name that is used in place of the actual name is: vxrapi.

The interface program has several options to control its operation. These options can be listed
by running the API program with the option '--help'. Here is the output:

~ # vxrapi --help
Version: V4.5-1
Usage: vxrapi [options]
---- network options ----
-L|--listen[=]port listen on this port, all addresses (default: 17567)
--vx[=]IP address address of VxRouter (default: 127.0.0.1)
we will send commands to the above IP address, socket: 27567
-N|--connections[=]n set the maximum number of open connections allowed (default: 12)
--mcast[=IP address] replace broadcasts with multicast to this IP address (default:

239.255.13.9)

---- serial options ----
-S|--serial[=device] use this serial device (default: /dev/ttyS2)
--serial=none disables the API serial port /dev/ttyS2
-B|--baud[=]speed sets serial baud rate (default: 9600)
---- generic options ----
--CR output CRLF instead of just LF
-f|--facility[=]name syslog facility reporting level (default is local4)
valid names: auth, daemon, user, local0 through local7
see the man page for syslog.conf for more information
-D|--debug write debug messages to the log file (multiple options increase the debug
level
--api write API messages received to the log file (level: NOTICE)
--avr write AVR commands to the log file (level: NOTICE)
--clog write connection status changes to the log file (level: NOTICE)
--delay[=]delay in ms, how long an upStream output must remain off, default is 300 ms.
minimum is 50ms, maximum is 1000ms, 0 will disable the delay
-b|--bcast[=]period in ms, how long between port status broadcasts, default is 4000 ms.
minimum is 500, maximum is 15000, 0 will disable the broadcast
if multicast is enabled, it will use this time setting
--bcast=0 will disable BOTH broadcasts and multicasts
-V|--verbose enable error text in responses
-h|--help display this help and exit
-v|--version output version information and exit

Default (no options) is to listen on socket 17567 at all IP addresses
send to socket 27567 at 127.0.0.1
accept commands from the RS232 port
broadcast switch status every 4000 milliseconds

signal SIGUSR1 will toggle api debug logging (--api)
signal SIGUSR2 will toggle avr debug logging (--avr)
signal SIGHUP will force the API to reread the P2P csv files located in /var/local/router/p2p/

To change the serial port baud rate to 115200 and send a CRLF at the end of each line, the
command syntax for the line in /etc/inittab would be:

::respawn:/usr/local/sbin/vx40api –-CR --baud=115200

Please remember that any changes you make to the router firmware will be lost if you
install a new SD card from Thinklogical®.

Revision: G

Advertising