Commit 79ee7e98 authored by Stefan van den Oord's avatar Stefan van den Oord

`pod update` -> NetUtils 1.3.1 with getAddressBytes()

parent 1a8fea76
......@@ -3,7 +3,7 @@ PODS:
- CocoaAsyncSocket (7.4.2)
- IGDigest (1.1.2)
- lz4 (128)
- NetUtils (1.2.0)
- NetUtils (1.3.1)
- Nimble (2.0.0-rc.2)
- OpenSSL-Framework (1.0.201)
- Quick (0.5.1)
......@@ -25,7 +25,7 @@ SPEC CHECKSUMS:
CocoaAsyncSocket: f5783bdedd232d91b89769bc4b5a1580aed518ad
IGDigest: 066753c10f3f1b593b00037b9ee93dc96b9e7762
lz4: 5e066195ca751d552becaa026f8fe213ff738adf
NetUtils: bf5ac285196d544dd5e0de1d3e18d945d66eedf8
NetUtils: 1be01b817b5aa7460054d7d1d15be557018f69ed
Nimble: e3cf5e73a491daf21c2bc88783dbfc55ce8b8e02
OpenSSL-Framework: f10c6aa8a92f69fca94303c3774b4773860a9690
Quick: 7426537a99e75076d6930c5b6da58006e4a9f38a
......
......@@ -3,7 +3,7 @@ PODS:
- CocoaAsyncSocket (7.4.2)
- IGDigest (1.1.2)
- lz4 (128)
- NetUtils (1.2.0)
- NetUtils (1.3.1)
- Nimble (2.0.0-rc.2)
- OpenSSL-Framework (1.0.201)
- Quick (0.5.1)
......@@ -25,7 +25,7 @@ SPEC CHECKSUMS:
CocoaAsyncSocket: f5783bdedd232d91b89769bc4b5a1580aed518ad
IGDigest: 066753c10f3f1b593b00037b9ee93dc96b9e7762
lz4: 5e066195ca751d552becaa026f8fe213ff738adf
NetUtils: bf5ac285196d544dd5e0de1d3e18d945d66eedf8
NetUtils: 1be01b817b5aa7460054d7d1d15be557018f69ed
Nimble: e3cf5e73a491daf21c2bc88783dbfc55ce8b8e02
OpenSSL-Framework: f10c6aa8a92f69fca94303c3774b4773860a9690
Quick: 7426537a99e75076d6930c5b6da58006e4a9f38a
......
......@@ -9,8 +9,8 @@ public class Interface : CustomStringConvertible, CustomDebugStringConvertible {
case ipv4, ipv6, other
public func toString() -> String {
switch (self) {
case .ipv4: return "IPV4"
case .ipv6: return "IPV6"
case .ipv4: return "IPv4"
case .ipv6: return "IPv6"
default: return "other"
}
}
......@@ -124,7 +124,27 @@ public class Interface : CustomStringConvertible, CustomDebugStringConvertible {
public func getName() -> String { return name }
public func getFamily() -> Family { return family }
public func getAddress() -> String? { return address }
public func getAddressBytes() -> [UInt8]? {
guard let addr = address else { return nil }
let af:Int32
let len:Int
switch family {
case .ipv4:
af = AF_INET
len = 4
case .ipv6:
af = AF_INET6
len = 16
default:
return nil
}
var bytes = [UInt8](count:len, repeatedValue:0)
let result = inet_pton(af, addr, &bytes)
return ( result == 1 ) ? bytes : nil
}
public func getNetmask() -> String? { return netmask }
public func getBroadcastAddress() -> String? { return broadcastAddress }
public func isRunning() -> Bool { return running }
......
#!/bin/sh
set -x
defaultXcodePath="/Applications/Xcode.app/Contents/Developer"
realXcodePath="`xcode-select -p`"
......@@ -30,4 +32,4 @@ main() {
done
}
main $*
\ No newline at end of file
main $*
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.2.0</string>
<string>1.3.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment