User`s manual

GENERIC PROTOCOL
39
Basic “G” Command
Action From Syntax
Modify Host G command_name { arguments… } ~
Query Host G command_name { arguments… } ~
Query Response Router G command_name { arguments… } ~
Modify is Protected: Yes
Report Changes: No
The command “G” is used to query or modify a router configuration parameter or parameters.
Summary lines at the start of each command section describe, for each type of command action
(Modify, Query, or Query Response), whether the command is sent to the router or from the
router and what the syntax of the command is. They also indicate whether or not the modify form
of the command is password-protected or not (“Modify is Protected”) and whether or not the
command participates in automatic reporting of parameter changes (“Report Changes”) as
described under the “G REPORT_CHANGES” command.
Each command has three possible syntax forms:
1.
Modify: this form is sent to the router to modify a parameter value
2. Query: this form is sent to the router to query for a parameter value
3. Query Response: this form is sent by the router to report the value of a parameter in
response to receiving a Query or in response to a change in the parameter value when automatic
reporting of parameter changes is turned on.
Generally, the command arguments identify the parameter that is being queried or modified, and
provide its new value if it is being modified. The first argument following the “G” command
character is a command name. Additional arguments may be required for some command
names to completely specify the parameter in question. After those, one or more additional
optional arguments may give a new value for the parameter. All arguments are separated from
one another by commas.
When the Modify form of the command is used and if the new value is a valid value, the router will
change the parameter value to this new value, providing that “Modify is Protected” says “No” or
the administrator password has been sent using the “K” command. It will then report the new
value to all router control ports that have requested these reports, providing that “Report
Changes” says “Yes”. If a new value is provided that is an illegal value, the parameter is left
unchanged and no “G” command is sent.
When the Query form of the command is used, the Query Response form of the command is
returned to the control port that sent the Query command, reporting the current value of the
parameter. The Query form of a command is normally the same as the Modify form except that
the new parameter values are not included. The Query Response form of a command is normally
the same as the Modify form (but of course the sender and receiver are reversed in these two
cases).
Some “G” commands may initiate an action or report the occurrence of an event, instead of
querying or changing a router parameter.
Commas are used to separate arguments in the “G” command.
Space characters should not appear within the “G” command arguments, except when they
appear within strings. Also, a single space character is allowed after the “G” character itself.
When a “G” command is sent by the router, it will always include this space, but the space is
optional when sending a “G” command to the router.
Character string arguments are delimited on both sides by a tilde (‘~’) character. Generally
character strings may contain any printable ASCII character except tilde, asterisk, and
exclamation.
Every “G” command must be terminated with a tilde (‘~’) character. This allows a command
parser to ignore any received “G” command that has a command_name that it doesn’t know
about.
The “G” commands available for any given router may vary, depending on the router model. The
“G SUPPORTED” command allows controllers to find out whether particular “G” commands are
supported by a given router or not.