AbstractOperatingSystem.st
branchjv
changeset 18075 bd252c0beac9
parent 18071 009cf668b0ed
parent 15520 1a6b940ae4a6
child 18098 2bbfe6952a44
--- a/AbstractOperatingSystem.st	Sun Jul 14 19:27:31 2013 +0100
+++ b/AbstractOperatingSystem.st	Tue Jul 16 14:00:13 2013 +0100
@@ -1826,33 +1826,30 @@
     |result|
 
     PipeFailed ~~ true ifTrue:[
-	PipeStream openErrorSignal handle:[:ex |
-	    PipeFailed := true.
-	    'OperatingSystem [warning]: cannot fork/popen' errorPrintCR.
-	    ex return.
-	] do:[
-	    |p line|
-
-	    p := PipeStream
-		    readingFrom:aCommand
-		    errorDisposition:errorDisposition
-		    inDirectory:nil.
-	    result := StringCollection new.
-	    [p atEnd] whileFalse:[
-		line := p nextLine.
-		(numLinesOrNil isNil
-		or:[result size < numLinesOrNil]) ifTrue:[
-		    result add:line
-		].
-	    ].
-	    p close.
-	    (p exitStatus notNil
-	    and:[p exitStatus success]) ifFalse:[
-		result isEmpty ifTrue:[
-		    result := nil
-		]
-	    ].
-	].
+        PipeStream openErrorSignal handle:[:ex |
+            PipeFailed := true.
+            'OperatingSystem [warning]: cannot fork/popen' errorPrintCR.
+            ex return.
+        ] do:[
+            |p line|
+
+            p := PipeStream
+                    readingFrom:aCommand
+                    errorDisposition:errorDisposition
+                    inDirectory:nil.
+            result := StringCollection new.
+            [p atEnd] whileFalse:[
+                line := p nextLine.
+                (numLinesOrNil isNil
+                or:[result size < numLinesOrNil]) ifTrue:[
+                    result add:line
+                ].
+            ].
+            p close.
+            (p exitStatus notNil and:[p exitStatus success]) ifFalse:[
+                result := result asNilIfEmpty
+            ].
+        ].
     ].
     ^ result
 
@@ -3508,6 +3505,21 @@
     self subclassResponsibility
 !
 
+getNetworkAddressInfo
+    "return a Dictionary of network interface information. 
+        key -> name of interface
+        value -> a Set of network address 
+                information for the interface - a dictionaries containing the 
+                information about the configuration of each interface in the system. 
+                The dictionary keys are:
+                    #address
+                    #netmask
+                    #flags
+                    #destAddress"
+
+    ^ self subclassResponsibility
+!
+
 getNetworkAddresses
     "return a dictionary with key:name of interface and
 			    value:the network address for each interface"
@@ -5330,45 +5342,45 @@
      (non-AF-prefixed) symbols; these will vanish."
 
     ^ #(
-	#AF_INET        #inet
-	#AF_UNIX        #unix
-	#AF_INET6       #inet6
-	#AF_APPLETALK   #appletalk
-	#AF_DECnet      #decnet
-	#AF_NS          #ns
-	#AF_X25         #x25
-	#AF_SNA
-	#AF_RAW
-	#AF_ISO
-	#AF_ECMA
-	#AF_NETBIOS     #netbios
-	#AF_IPX
-	#AF_AX25
-	#AF_NETROM
-	#AF_BRIDGE
-	#AF_BSC
-	#AF_ROSE
-	#AF_IRDA        #irda
-	#AF_NETLINK
-	#AF_NETLINK
-	#AF_NETBEUI
-	#AF_ATM
-	#AF_ATMPVC
-	#AF_ATMSVC
-	#AF_BAN
-	#AF_VOICEVIEW
-	#AF_ECONET
-	#AF_IMPLINK
-	#AF_PUP
-	#AF_CHAOS
-	#AF_DLI
-	#AF_LAT
-	#AF_HYLINK
-	#AF_FIREFOX
-	#AF_CLUSTER
-	#AF_12844
-	#AF_NETDES
-       ) select:[:sym | (AbstractOperatingSystem domainCodeOf:sym) isNumber ]
+        #AF_INET        
+        #AF_UNIX        
+        #AF_INET6       
+        #AF_APPLETALK   
+        #AF_DECnet      
+        #AF_NS          
+        #AF_X25         
+        #AF_SNA
+        #AF_RAW
+        #AF_ISO
+        #AF_ECMA
+        #AF_NETBIOS     
+        #AF_IPX
+        #AF_AX25
+        #AF_NETROM
+        #AF_BRIDGE
+        #AF_BSC
+        #AF_ROSE
+        #AF_IRDA        
+        #AF_NETLINK
+        #AF_NETLINK
+        #AF_NETBEUI
+        #AF_ATM
+        #AF_ATMPVC
+        #AF_ATMSVC
+        #AF_BAN
+        #AF_VOICEVIEW
+        #AF_ECONET
+        #AF_IMPLINK
+        #AF_PUP
+        #AF_CHAOS
+        #AF_DLI
+        #AF_LAT
+        #AF_HYLINK
+        #AF_FIREFOX
+        #AF_CLUSTER
+        #AF_12844
+        #AF_NETDES
+       ) select:[:sym | (AbstractOperatingSystem domainCodeOf:sym) isInteger ]
 
     "
      AbstractOperatingSystem supportedProtocolFamilies
@@ -7249,11 +7261,11 @@
 !AbstractOperatingSystem class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.239 2013-07-08 19:27:09 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.242 2013-07-13 20:40:45 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.239 2013-07-08 19:27:09 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.242 2013-07-13 20:40:45 cg Exp $'
 ! !