~ubuntu-branches/ubuntu/oneiric/wvdial/oneiric

« back to all changes in this revision

Viewing changes to papchaptest.cc

  • Committer: Bazaar Package Importer
  • Author(s): Frank Lichtenheld
  • Date: 2005-01-21 09:42:37 UTC
  • mfrom: (0.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050121094237-64tviej0pyxe979m
Tags: 1.54.0-1.1
* Non-maintainer upload.
* Recompile with latest libwvstreams-dev (Closes: #291506)
* Use pkg-config to get the right compiler flags
  (Closes: #289236)
* While I'm on it, remove .. and ../wvstreams from include paths,
  since these should probably never be used in a Debian package

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Worldvisions Weaver Software:
 
3
 *   Copyright (C) 1997-2002 Net Integration Technologies, Inc.
 
4
 *
 
5
 * Little test program for WvPapChap.
 
6
 */
 
7
 
 
8
#include "wvpapchap.h"
 
9
 
 
10
int main( int argc, char * argv[] )
 
11
/*********************************/
 
12
{
 
13
    if( argc != 4 ) {
 
14
        printf( "Usage: papchaptest username remote password\n" );
 
15
        return( -1 );
 
16
    }
 
17
 
 
18
    WvPapChap   papchap;
 
19
 
 
20
    papchap.put_secret( argv[1], argv[3], argv[2] );
 
21
 
 
22
    if( papchap.isok_pap() )
 
23
        printf( "PAP successful.\n" );
 
24
    else
 
25
        printf( "PAP failed.\n" );
 
26
 
 
27
    if( papchap.isok_chap() )
 
28
        printf( "CHAP successful.\n" );
 
29
    else
 
30
        printf( "CHAP failed.\n" );
 
31
 
 
32
    return( 0 );
 
33
}