O'Reilly logo

Win32 Perl Programming: The Standard Extensions, Second Edition by Dave Roth

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Managing RAS Servers

For those of you who have RAS servers, it is awfully convenient to check on your modems to see who is logged on, which ports are in use, and who is allowed to dial in. These functions, among others, are available from the Win32::RasAdmin extension.

Discovering Ports on the Server

When you have the urge to find out which ports on your RAS server are in use, you can sink your teeth into the GetPorts() function:

Win32::RasAdmin::GetPorts( $Server [, \%Hash] ); 

With this function, the $Server parameter is the proper name of the computer you want to query, as in \\server1.

The optional second parameter (\%Hash ) is a reference to a hash. If the function is successful, the hash reference will be filled out with a hash of hashes. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required