Home Page The Club Computers News Links Glossary EYAWTK
Before Amiga Background ICS OCS ECS AGA ??? PPC
U-Boot SLB Linux Amiga OS Dual Boot Motherboards Peripherals Other
Initialisation Installation OS4 Updates About OS4 File Systems Networking Printing Other
Introduction File System Workbench Preferences Commands Error Msgs Miscellaneous

AmigaOS 4.0 - About OS4 - Commands

GETNETSTATUS Networking
Purpose: To query whether the network is operational.
Format: GETNETSTATUS [CHECK <interface>] [QUIET]
Template: CHECK/K, QUIET/S
Path: C:getnetstatus
GETNETSTATUS queries whether the network is operational, and can be used in script files or for quick diagnostic purposes.

The CHECK argument specifies the conditions to check, which must be separated by commas. The following conditions can be checked:

INTERFACES Checks whether the networking interfaces are configured and operational.
PTPINTERFACES Checks whether any point-to-point interfaces, e.g. SLIP and PPP, are configured and operational.
BCASTINTERFACES Checks whether any broadcast interfaces, e.g. Ethernet, configured and operational.
RESOLVER Checks whether any name resolution servers are configured.
ROUTES Checks whether any routing information is configured.
DEFAULTROUTE Checks whether the default route is configured. Default for this option is all of the above.
If any of the conditions tested for is not satisfied, an error message is displayed and GETNETSTATUS will exit with status 5, which can be tested in script files using the 'IF WARN' command.

If no CHECK options are specified, then GETNETSTATUS will print version information and the list of conditions that can be tested for, indicating which ones are satisfied and which are not.

The QUIET argument is used to suppress all error messages; the default is to display them.

Example 1:

  3.OS4:> GETNETSTATUS
  bsdsocket.library 4.286 (14.6.2006) [Roadshow 4.286 (14.6.2006)]
  Networking interfaces are available and configured.
  No point-to-point networking interfaces are available and configured.
  Broadcast networking interfaces are available and configured.
  Name resolution servers are configured.
  Routing information is configured.
  The default route is configured.

in this example we can see that a network is active. The results would be different if a network was not active.

Example 2:

  3.OS4:> GETNETSTATUS CHECK INTERFACES
  3.OS4:>

in this example nothing was displayed, which indicates the check was successful.

Example 3:

  3.OS4:> GETNETSTATUS CHECK PTPINTERFACES
  No point-to-point networking interfaces are available and configured.
  3.OS4:>

in this example point-to-point networking interfaces were not available so an error message was displayed, and STATUS was set to 5.

Example 4:

  3.OS4:> GETNETSTATUS CHECK PTPINTERFACES QUIET
  3.OS4:>

in this example point-to-point networking interfaces were not available but because QUIET was specified no error message was displayed. However STATUS was still set to 5.


Return to Commands Selection

Disclaimer: Amiga Auckland have prepared the above information for the use of its members based on our experiences and as such is subject to revision at any time. Amiga Auckland cannot guarantee any of the information and cannot be held accountable for any issues that may result from using it.


Copyright 2006 Amiga Auckland Inc. All rights reserved.
Revised: December 24, 2006.