- int rc = -1;
-
- // First time check for ifconfig location. We only use the variant which
- // does not take arguments, a la GNU.
- if ( m_CanUseIfconfig == -1 ) // unknown
- {
- static const wxChar *ifconfigLocations[] =
- {
- _T("/sbin"), // Linux, FreeBSD
- _T("/usr/sbin"), // SunOS, Solaris, AIX, HP-UX
- _T("/usr/etc"), // IRIX
- };
-
- for ( size_t n = 0; n < WXSIZEOF(ifconfigLocations); n++ )
- {
- wxString path(ifconfigLocations[n]);
- path << _T("/ifconfig");
-
- if ( wxFileExists(path) )
- {
- m_IfconfigPath = path;
- break;
- }
- }
- }
-
- wxLogNull ln; // suppress all error messages
- // Let´s try the ifconfig method first, should be fastest:
- if(m_CanUseIfconfig != 0) // unknown or yes
- {
- wxASSERT(m_IfconfigPath.length());
-
- wxString tmpfile = wxGetTempFileName("_wxdialuptest");
- wxString cmd = "/bin/sh -c \'";
- cmd << m_IfconfigPath;
-#if defined(__SOLARIS__) || defined (__SUNOS__)
- // need to add -a flag
- cmd << " -a";
+#ifdef __VMS
+ m_CanUseIfconfig = 0;
+ return -1;
+#else
+ // assume that the test doesn't work
+ int netDevice = NetDevice_Unknown;
+
+ // first time check for ifconfig location
+ if ( m_CanUseIfconfig == -1 ) // unknown
+ {
+ static const wxChar *const ifconfigLocations[] =
+ {
+ wxT("/sbin"), // Linux, FreeBSD, Darwin
+ wxT("/usr/sbin"), // SunOS, Solaris, AIX, HP-UX
+ wxT("/usr/etc"), // IRIX
+ wxT("/etc"), // AIX 5
+ };
+
+ for ( size_t n = 0; n < WXSIZEOF(ifconfigLocations); n++ )
+ {
+ wxString path(ifconfigLocations[n]);
+ path << wxT("/ifconfig");
+
+ if ( wxFileExists(path) )
+ {
+ m_IfconfigPath = path;
+ break;
+ }
+ }
+ }
+
+ if ( m_CanUseIfconfig != 0 ) // unknown or yes
+ {
+ wxLogNull ln; // suppress all error messages
+
+ wxASSERT_MSG( m_IfconfigPath.length(),
+ wxT("can't use ifconfig if it wasn't found") );
+
+ wxString tmpfile = wxFileName::CreateTempFileName( wxT("_wxdialuptest") );
+ wxString cmd = wxT("/bin/sh -c \'");
+ cmd << m_IfconfigPath;
+#if defined(__AIX__) || \
+ defined(__NETBSD__) || \
+ defined(__OSF__) || \
+ defined(__SOLARIS__) || defined (__SUNOS__)
+ // need to add -a flag
+ cmd << wxT(" -a");