Networking Principles Essay Research Paper DialUp Scripting

Free Articles

Networking Principles Essay, Research Paper

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!


order now

Dial-Up Scripting Command Language

For Dial-Up Networking Scripting Support

Copyright ( degree Celsius ) 1995 Microsoft Corp.

Table of Contentss

1.0 Overview

2.0 Basic Structure of a Script

3.0 Variables

3.1 System Variables

4.0 String Misprints

5.0 Expressions

6.0 Remarks

7.0 Keywords

8.0 Commands

9.0 Reserved Wordss

1.0 Overview

Many Internet service suppliers and online services require you to manually come in information, such as your user name and watchword, to set up a connexion. With Scripting support for Dial-Up Networking, you can compose a book to automatize this procedure.

A book is a text file that contains a series of bids, parametric quantities, and looks required by your Internet service supplier or online service to set up the connexion and utilize the service. You can utilize any text editor, such as Microsoft Notepad, to make a book file. Once you & # 8217 ; ve created your book file, you can so delegate it to a specific Dial-Up Networking connexion by running the Dial-Up Scripting Tool.

2.0 Basic Structure of a Script

A bid is the basic direction that a book file contains. Some bids require parametric quantities that farther specify what the bid should make. An look is a combination of operators and statements that create a consequence. Expressions can be used as values in any bid. Examples of looks include arithmetic, relational comparings, and threading concatenations.

The basic signifier of a book for Dial-Up Networking follows:

;

; A remark begins with a semi-colon and extends to

; the terminal of the line.

;

proc chief

; A book can hold any figure of variables

; and bids

variable declarations

bid block

endproc

A book must hold a chief process, specified by the proc keyword, and a duplicate endproc keyword, bespeaking the terminal of the process.

You must declare variables before you add bids. The first bid in the chief process is executed, and so any subsequent bids are executed in the order they appear in the book. The book ends when the terminal of the chief process is reached.

3.0 Variables

Scripts may incorporate variables. Variable names must get down with a missive or an underline ( & # 8217 ; _ ‘ ) , and may incorporate any sequence of upper- or lower-case letters, figures, and underlines. You can non utilize a reserved word as a variable name. For more information, see the list of reserved words at the terminal of this papers.

You must declare variables before you use them. When you declare a variable, you must besides specify its type. A variable of a certain type may merely incorporate values of that same type. The undermentioned three types of variables are supported:

Type Description

whole number A negative or positive figure, such as 7, -12, or 5698.

threading A series of characters enclosed in double-quotes ; for illustration, & # 8220 ; Hello universe! & # 8221 ; or & # 8220 ; Enter watchword: & # 8221 ; .

boolean A logical boolean value of TRUE or FALSE.

Variables are assigned values utilizing the undermentioned assignment statement:

variable = look

The variable gets the evaluated look.

Examples:

whole number count = 5

whole number timeout = ( 4 * 3 )

whole number I

Boolean bDone = FALSE

threading szIP = ( getip 2 )

set ipaddr szIP

3.1 System Variables

System variables are set by scripting bids or are determined by the information your enter when you set up a Dial-Up Networking connexion. System variables are read-only, which means they can non be changed within the book. The system variables are:

Name Type Description

$ USERID Stringing The user designation for the current connexion. This variable is

the value of the user name specified in the Dial-Up Networking

Connect To dialog box.

$ PASSWORD String The watchword for the current connexion. This variable is the

value of the user name specified in the Dial-Up Networking

Connect To dialog box.

$ SUCCESS Boolean This variable is set by certain bids to bespeak whether or non the bid succeeded. A book can do

determinations based upon the value of this variable.

$ FAILURE Boolean This variable is set by certain bids to bespeak

whether or non the bid failed. A book can do determinations

based upon the value of this variable.

These variables may be used wherever an look of a similar type is used. For illustration,

transmit $ USERID

is a valid bid because $ USERID is a variable of type twine.

4.0 String Misprints

Scripting for Dial-Up Networking supports flight sequences and caret interlingual renditions, as described below.

Stringing Literal Description

^char Caret interlingual rendition

If char is a value between & # 8216 ; @ & # 8217 ; and & # 8216 ; _ & # 8217 ; , the character sequence is translated into a single-byte value between 0 and 31. For illustration, ^M is converted to a passenger car return.

If char is a value between a and omega, the character sequence is translated into a single-byte value between 1 and 26.

If char is any other value, the character sequence is non specially treated.

*cr* Carriage return

*lf* Linefeed

& # 8221 ; Double-quote

^ Single caret

* Single & # 8216 ; * & # 8217 ;

Backslash

Examples:

transmit & # 8220 ; ^M & # 8221 ;

transmit & # 8220 ; Joe^M & # 8221 ;

transmit & # 8220 ; *cr**lf* & # 8221 ;

waitfor & # 8220 ; *cr**lf* & # 8221 ;

5.0 Expressions

An look is a combination of operators and statements that evaluates to a consequence. Expressions can be used as values in any bid.

An look can unite any variable, or whole number, twine, or Boolean values with any of the unary and binary operators in the undermentioned tabular arraies. All unary operators take the highest precedency. The precedency of binary operators is indicated by their place in the tabular array.

The unary operators are:

Operator Type of Operation

– Unary subtraction

! One & # 8217 ; s complement

The binary operators are listed in the following tabular array in their order of precedency. Operators with higher precedency are listed first:

Operators Type of Operation Type Restrictions

* / Multiplicative Integers

+ & # 8211 ; Additive whole numbers Strings ( + merely )

* * *= *= Relational Integers

== ! = Equality Integers, strings, booleans

and Logical AND Booleans

or Logical OR Booleans

Examples:

count = 3 + 5 * 40

transmit & # 8220 ; Hello & # 8221 ; + & # 8221 ; there & # 8221 ;

hold 24 / ( 7 & # 8211 ; 1 )

6.0 Remarks

All text on a line following a semicolon is ignored.

Examples:

; this is a remark

transmit & # 8220 ; hello & # 8221 ; ; convey the twine & # 8220 ; hello & # 8221 ;

7.0 Keywords

Keywords specify the construction of the book. Unlike bids, they do non execute an action. The keywords are listed below.

proc name

Indicates the beginning of a process. All books must hold a chief process ( proc chief ) . Script executing starts at the chief process and terminates at the terminal of the chief process.

endproc

Indicates the terminal of a process. When the book is executed to the endproc statement for the chief process, Dial-Up Networking will get down PPP or SLIP.

whole number name [ = value ]

Declares a variable of type whole number. You can utilize any numerical look or variable to initialise the variable.

threading name [ = value ]

Declares a variable of type twine. You can utilize any string actual or variable to initialise the variable.

Boolean name [ = value ]

Declares a variable of type boolean. You can utilize any Boolean look or variable to initialise the variable.

8.0 Commands

All bids are reserved words, which means you can non declare variables that have the same names as the bids. The bids are listed below:

hold nSeconds

Pauses for the figure of seconds specified by nSeconds before put to deathing the following bid in the book.

Examples:

hold 2 ; intermissions for 2 seconds

hold x * 3 ; intermissions for x * 3 seconds

getip value

Delaies for an IP reference to be received from the distant computing machine. If your Internet service supplier returns several IP references in a twine, use the value parametric quantity to stipulate which IP address the book should utilize.

Examples:

; acquire the 2nd IP reference

set ipaddr getip 2

; delegate the first received IP reference to a variable

szAddress = getip

goto label

Jumps to the location in the book specified by label and continues put to deathing the bids following it.

Examples:

waitfor & # 8220 ; Prompt* & # 8221 ; until 10

if! $ SUCCESS so

goto BailOut ; leaps to BailOut and executes bids

; following it

endif

transmit & # 8220 ; bbs^M & # 8221 ;

goto End

BailOut:

transmit & # 8220 ; ^M & # 8221 ;

arrest

Stops the book. This bid does non take the terminal duologue window. You must snap Continue to set up the connexion. You can non re-start the book.

if status so

bids

endif

Executes the series of bids if status is TRUE.

Examples:

if $ USERID == & # 8220 ; John & # 8221 ; so

transmit & # 8220 ; Johnny^M & # 8221 ;

endif

label:

Specifies the topographic point in the book to leap to. A label must be a alone name and follow the appellative conventions of variables.

set port databits 5 | 6 | 7 | 8

Changes the figure of spots in the bytes that are transmitted and received during the session. The figure of spots can be between 5 and 8. If you do non include this bid, Dial-Up Networking will utilize the belongingss scenes specified for the connexion.

Examples:

set port databits 7

set port para none | odd | even | grade | infinite

Changes the para strategy for the port during the session. If you do non include this bid, Dial-Up Networking will utilize the belongingss scenes specified for the connexion.

Examples:

set port para even

set port stopbits 1 | 2

Changes the figure of stop spots for the port during the session. This figure can be either 1 or 2. If you do non include this bid, Dial-Up Networking uses the belongingss scenes specified for the connexion.

Examples:

set port stopbits 2

set screen keyboard on | off

Enables or disables keyboard input in the scripting terminus window.

Examples:

set screen keyboard on

set ipaddr twine

Specifies the IP reference of the workstation for the session. Stringing must be in the signifier of an IP reference.

Examples:

szIPAddress = & # 8220 ; 11.543.23.13 & # 8243 ;

set ipaddr szIPAddress

set ipaddr & # 8220 ; 11.543.23.13 & # 8243 ;

set ipaddr getip

transmit threading [ , natural ]

Sends the characters specified by threading to the distant computing machine.

The distant computing machine will acknowledge flight sequences and caret interlingual renditions, unless you include the natural parametric quantity with the bid. The natural parametric quantity is utile when conveying $ USERID and $ PASSWORD system variables when the user name or watchword contains character sequences that, without the natural parametric quantity, would be interpreted as caret or flight sequences.

Examples:

transmit & # 8220 ; slip & # 8221 ; + & # 8220 ; ^M & # 8221 ;

transmit $ USERID, raw

waitfor twine [ , matchcase ] [ so label

{ , threading [ , matchcase ] so label } ]

[ until clip ]

Delaies until your computing machine receives one or more of the specified strings from the distant computing machine. The twine parametric quantity is case-insensitive, unless you include the matchcase parametric quantity.

If a matching twine is received and the so label parametric quantity is used, this bid will leap to the topographic point in the book file designated by label.

The optional until clip parametric quantity defines the maximal figure of seconds that your computing machine will wait to have the twine before it execute the following bid. Without this

parametric quantity, your computing machine will wait everlastingly.

If your computing machine receives one of the specified strings, the system variable $ SUCCESS is set to TRUE. Otherwise, it is set to FALSE if the figure of seconds specified by clip elapses before the twine is received.

Examples:

waitfor & # 8220 ; Login: & # 8221 ;

waitfor & # 8220 ; Password? & # 8221 ; , matchcase

waitfor & # 8220 ; prompt* & # 8221 ; until 10

waitfor

& # 8220 ; Login: & # 8221 ; so DoLogin,

& # 8220 ; Password: & # 8221 ; so DoPassword,

& # 8220 ; BBS: & # 8221 ; so DoBBS,

& # 8220 ; Other: & # 8221 ; so DoOther

until 10

while status do

bids

endwhile

Executes the series of bids until status is FALSE.

Examples:

whole number count = 0

while count * 4 do

transmit & # 8220 ; ^M & # 8221 ;

waitfor & # 8220 ; Login: & # 8221 ; until 10

if $ SUCCESS so

goto DoLogin

endif

count = count + 1

endwhile

& # 8230 ;

9.0 Reserved Wordss

The undermentioned words are reserved and may non be used as variable names.

and boolean databits detain

make endif endproc endwhile

even FALSE getip goto

arrest if whole number ipaddr

keyboard grade matchcase none

odd off on or

para port proc altogether

screen set infinite stopbits

threading so transmit TRUE

until waitfor while

Post a Comment

Your email address will not be published. Required fields are marked *

*

x

Hi!
I'm Katy

Would you like to get such a paper? How about receiving a customized one?

Check it out