https://github.com/maximbilan/swiftipconfig
A lightweight low-level framework that displays all current TCP/IP network configuration values.
https://github.com/maximbilan/swiftipconfig
ipconfig swift tcp-ip
Last synced: 11 months ago
JSON representation
A lightweight low-level framework that displays all current TCP/IP network configuration values.
- Host: GitHub
- URL: https://github.com/maximbilan/swiftipconfig
- Owner: maximbilan
- License: mit
- Created: 2022-06-25T15:21:39.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-25T17:47:45.000Z (over 3 years ago)
- Last Synced: 2024-12-30T09:26:22.445Z (about 1 year ago)
- Topics: ipconfig, swift, tcp-ip
- Language: C
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SwiftIPConfig
A lightweight low-level framework that displays all current TCP/IP network configuration values.
## How to use
```swift
import SwiftIPConfig
/// Local IP address. For example: "192.168.1.34"
let ip = SwiftIPConfig.getIP()
/// Gateway IP. A gateway IP refers to a device on a network which sends local network traffic to other networks. For example: "192.168.1.1"
let gatewayIP = SwiftIPConfig.getGatewayIP()
/// Netmask. Netmasks (or subnet masks) are a shorthand for referring to ranges of consecutive IP addresses in the Internet Protocol. For example: "255.255.255.0"
let netmask = SwiftIPConfig.getNetmask()
```
## Swift Package Manager (SPM)
```swift
dependencies: [
.package(url: "https://github.com/maximbilan/SwiftIPConfig", from: "0.1"))
]
```