Come configurare un servizio di collegamento IPDLC

  1. Recuperare le istruzioni del prompt dei comandi.

  2. Se necessario, recuperare il nome dell'adattatore.

  3. Creare il servizio di collegamento.

  4. Creare la sessione indipendente.

    L'esempio di codice seguente descrive come configurare un servizio di collegamento IPDLC. Nella tabella seguente vengono descritte le opzioni del prompt dei comandi pertinenti:

Switch della riga di comando Descrizione
-p PrimaryNNS: server del nodo di rete primario
-b (Facoltativo) BackupNNS: server del nodo di rete di backup
-d (Facoltativo) dispositivo: esegue l'override del nome dell'adattatore individuato
-l (Facoltativo) LenNode: usato per configurare il nodo LEN (il valore predefinito è 1°)
    On Error Resume   Next  
'Declarations and Constants  
    Dim strPrimaryNNS  
    Dim strBackupNNS  
    Dim strLocalAddress  
    Dim strLenNode  
    Dim strComputerName  
    Dim wshEnvProc  
'Defaults  
    strPrimaryNNS = ""  
    strBackupNNS = ""  
    strLocalAddress = ""  
    strLenNode = "SNA Service"  
'Get the command line  
    Set objArgs = WScript.Arguments  
    For I = 0 to objArgs.Count - 1  
       select case objArgs(I)  
        Case "-p"  
            I = I + 1  
            strPrimaryNNS = objArgs(I)  
        case "-b"  
            I = I + 1  
            strBackupNNS = objArgs(I)  
        case "-d"  
            I = I + 1  
            strLocalAddress = objArgs(I)  
        case "-l"  
            I = I + 1  
            strLenNode = objArgs(I)  
        case else  
            Wscript.Echo "Script Usage: "  
            Wscript.Echo " -p Primary NNS (Required)"  
            Wscript.Echo " -b Backup NNS (Optional)"  
            wscript.echo " -d Device Name (Optional)"  
            wscript.echo " -l Len Node (Optional)"  
            return  
       end select  
    Next  
'NNS parameter is required  
    if strPrimaryNNS = "" then  
       Wscript.Echo "Please supply the -p (PrimaryNNS) parameter"  
       return  
    end if  
'See if we need to get a device  
    if strLocalAddress = "" then  
       GetAdapterName()  
    end if  
' Two methods for creating the link service and independent session connection  
    CreateIPDLCLinkService  
    CreateIndependentSession