Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
4148cc4
Update imports in Sources/Netlink/Attribute.swift
colemancda Nov 27, 2026
9e3598b
Update imports in Sources/Netlink/AttributeCodable.swift
colemancda Nov 27, 2026
b4bb56d
Update imports in Sources/Netlink/AttributeDecoder.swift
colemancda Nov 27, 2026
61fbbde
Update imports in Sources/Netlink/AttributeEncoder.swift
colemancda Nov 27, 2026
4f16071
Update imports in Sources/Netlink/ErrorMessage.swift
colemancda Nov 27, 2026
e16afb0
Update imports in Sources/Netlink/Internal/CInterop.swift
colemancda Nov 27, 2026
7559f2a
Update imports in Sources/Netlink/Internal/Integer.swift
colemancda Nov 27, 2026
9bdc653
Update imports in Sources/Netlink/Internal/Linux.swift
colemancda Nov 27, 2026
6c9dbd2
Update imports in Sources/Netlink/Message.swift
colemancda Nov 27, 2026
f26b661
Update imports in Sources/Netlink/MessageFlag.swift
colemancda Nov 27, 2026
8b66522
Update imports in Sources/Netlink/MessageHeader.swift
colemancda Nov 27, 2026
f046dfe
Update imports in Sources/Netlink/MessageType.swift
colemancda Nov 27, 2026
4e78a7f
Update imports in Sources/Netlink/Socket.swift
colemancda Nov 27, 2026
f1f352d
Update imports in Sources/Netlink/SocketAddress.swift
colemancda Nov 27, 2026
4d4d0cb
Update imports in Sources/Netlink/SocketOption.swift
colemancda Nov 27, 2026
a52fb4f
Update imports in Sources/Netlink/SocketProtocol.swift
colemancda Nov 27, 2026
bc8bf9b
Update imports in Sources/Netlink80211/NL80211Attribute.swift
colemancda Nov 27, 2026
a3bb8da
Update imports in Sources/Netlink80211/NL80211Command.swift
colemancda Nov 27, 2026
689c27f
Update imports in Sources/Netlink80211/NL80211GetInterfaceCommand.swift
colemancda Nov 27, 2026
86e36b6
Update imports in Sources/Netlink80211/NL80211GetScanResultsCommand.s…
colemancda Nov 27, 2026
741f027
Update imports in Sources/Netlink80211/NL80211GetWiphyCommand.swift
colemancda Nov 27, 2026
8170231
Update imports in Sources/Netlink80211/NL80211Interface.swift
colemancda Nov 27, 2026
d30e943
Update imports in Sources/Netlink80211/NL80211MulticastGroup.swift
colemancda Nov 27, 2026
2d641f6
Update imports in Sources/Netlink80211/NL80211ScanResult.swift
colemancda Nov 27, 2026
4d266b9
Update imports in Sources/Netlink80211/NL80211TriggerScanCommand.swift
colemancda Nov 27, 2026
7b8a365
Update imports in Sources/Netlink80211/NL80211TriggerScanStatus.swift
colemancda Nov 27, 2026
f20a8af
Update imports in Sources/Netlink80211/NL8021Wiphy.swift
colemancda Nov 27, 2026
b4e2aca
Update imports in Sources/Netlink80211/Netlink80211.swift
colemancda Nov 27, 2026
fb0bd4d
Update imports in Sources/NetlinkGeneric/GenericFamilyController.swift
colemancda Nov 27, 2026
f8ff45d
Update imports in Sources/NetlinkGeneric/GenericFamilyIdentifier.swift
colemancda Nov 27, 2026
360df72
Update imports in Sources/NetlinkGeneric/GenericGroupIdentifier.swift
colemancda Nov 27, 2026
f62c246
Update imports in Sources/NetlinkGeneric/GenericMessage.swift
colemancda Nov 27, 2026
97d831c
Update imports in Sources/NetlinkGeneric/Internal/Integer.swift
colemancda Nov 27, 2026
9912666
Update imports in Sources/NetlinkGeneric/NetlinkGetGenericFamilyIdent…
colemancda Nov 27, 2026
1709ca4
Update imports in Tests/Netlink80211Tests/Netlink80211Tests.swift
colemancda Nov 27, 2026
edc5e75
Update imports in Tests/NetlinkGenericTests/NetlinkGenericTests.swift
colemancda Nov 27, 2026
5c53837
Update imports in Tests/NetlinkTests/NetlinkTests.swift
colemancda Nov 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Sources/Netlink/Attribute.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
// Created by Alsey Coleman Miller on 7/8/18.
//

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif

/// Netlink Attribute Type
///
Expand Down
4 changes: 4 additions & 0 deletions Sources/Netlink/AttributeCodable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
// Created by Alsey Coleman Miller on 7/28/18.
//

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif

public protocol NetlinkAttributeCodingKey: CodingKey {

Expand Down
4 changes: 4 additions & 0 deletions Sources/Netlink/AttributeDecoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
// Created by Alsey Coleman Miller on 7/28/18.
//

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif

/// Netlink Attribute Decoder
public struct NetlinkAttributeDecoder {
Expand Down
4 changes: 4 additions & 0 deletions Sources/Netlink/AttributeEncoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
// Created by Alsey Coleman Miller on 7/28/18.
//

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif

/// Netlink Attribute Encoder
public struct NetlinkAttributeEncoder {
Expand Down
4 changes: 4 additions & 0 deletions Sources/Netlink/ErrorMessage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
// Created by Alsey Coleman Miller on 7/8/18.
//

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
#if canImport(System)
import System
#else
Expand Down
5 changes: 3 additions & 2 deletions Sources/Netlink/Internal/CInterop.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import SystemPackage
#endif
import Socket
#if canImport(System)
// Socket's CInterop extensions are defined on the package type.
import SystemPackage
public typealias CInterop = SystemPackage.CInterop
#endif
Expand Down Expand Up @@ -44,7 +45,7 @@ internal extension CInterop.NetlinkSocketAddress {
group: CInt = 0
) {
self.init(
nl_family: CInterop.SocketAddressFamily(SocketAddressFamily.netlink.rawValue),
nl_family: UInt16(SocketAddressFamily.netlink.rawValue),
nl_pad: UInt16(),
nl_pid: __u32(processID.rawValue),
nl_groups: __u32(bitPattern: group)
Expand All @@ -53,7 +54,7 @@ internal extension CInterop.NetlinkSocketAddress {

static var zero: CInterop.NetlinkSocketAddress {
.init(
nl_family: CInterop.SocketAddressFamily(SocketAddressFamily.netlink.rawValue),
nl_family: UInt16(SocketAddressFamily.netlink.rawValue),
nl_pad: 0,
nl_pid: 0,
nl_groups: 0
Expand Down
8 changes: 6 additions & 2 deletions Sources/Netlink/Internal/Integer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@
// Copyright © 2015 PureSwift. All rights reserved.
//

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif

internal extension size_t {
internal extension Int {

var extendTo4Bytes: size_t {
var extendTo4Bytes: Int {

return self + ((4 - (self & 3)) & 3);
}
Expand Down
6 changes: 5 additions & 1 deletion Sources/Netlink/Internal/Linux.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
// Created by Alsey Coleman Miller on 7/29/18.
//

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
#if canImport(System)
import System
#else
Expand Down Expand Up @@ -110,7 +114,7 @@ public var NLA_F_NET_BYTEORDER: CInt { (1 << 14) }

public struct sockaddr_nl {

public var nl_family: CInterop.SocketAddressFamily = 0 /* AF_NETLINK */
public var nl_family: UInt16 = 0 /* AF_NETLINK */

public var nl_pad: UInt16 = 0 /* zero */

Expand Down
13 changes: 13 additions & 0 deletions Sources/Netlink/Message.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,20 @@
// Created by Alsey Coleman Miller on 7/6/18.
//

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
#if canImport(Glibc)
import Glibc
#elseif canImport(Darwin)
import Darwin
#elseif canImport(Musl)
import Musl
#elseif canImport(Bionic)
import Bionic
#endif
@_implementationOnly import CNetlink

public protocol NetlinkMessageProtocol {
Expand Down
4 changes: 4 additions & 0 deletions Sources/Netlink/MessageFlag.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
//
//

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_implementationOnly import CNetlink

/// Netlink Message Flag
Expand Down
13 changes: 13 additions & 0 deletions Sources/Netlink/MessageHeader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,20 @@
//
//

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
#if canImport(Glibc)
import Glibc
#elseif canImport(Darwin)
import Darwin
#elseif canImport(Musl)
import Musl
#elseif canImport(Bionic)
import Bionic
#endif
@_implementationOnly import CNetlink

/*
Expand Down
4 changes: 4 additions & 0 deletions Sources/Netlink/MessageType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
//
//

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_implementationOnly import CNetlink

/**
Expand Down
4 changes: 4 additions & 0 deletions Sources/Netlink/Socket.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
// Created by Alsey Coleman Miller on 7/6/18.
//

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
#if canImport(System)
import System
#else
Expand Down
4 changes: 4 additions & 0 deletions Sources/Netlink/SocketAddress.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
// Created by Alsey Coleman Miller on 4/22/22.
//

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
#if canImport(System)
import System
#else
Expand Down
4 changes: 4 additions & 0 deletions Sources/Netlink/SocketOption.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
// Created by Alsey Coleman Miller on 4/22/22.
//

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
#if canImport(System)
import System
#else
Expand Down
4 changes: 4 additions & 0 deletions Sources/Netlink/SocketProtocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
// Created by Alsey Coleman Miller on 7/6/18.
//

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
#if canImport(System)
import System
#else
Expand Down
4 changes: 4 additions & 0 deletions Sources/Netlink80211/NL80211Attribute.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
// Created by Alsey Coleman Miller on 7/7/18.
//

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
import Netlink
@_implementationOnly import CNetlink

Expand Down
4 changes: 4 additions & 0 deletions Sources/Netlink80211/NL80211Command.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
// Created by Alsey Coleman Miller on 7/7/18.
//

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
import Netlink
import NetlinkGeneric
@_implementationOnly import CNetlink
Expand Down
4 changes: 4 additions & 0 deletions Sources/Netlink80211/NL80211GetInterfaceCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
// Created by Alsey Coleman Miller on 4/23/22.
//

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
import Netlink
import NetlinkGeneric

Expand Down
4 changes: 4 additions & 0 deletions Sources/Netlink80211/NL80211GetScanResultsCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
// Created by Alsey Coleman Miller on 7/28/18.
//

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
import Netlink
import NetlinkGeneric

Expand Down
4 changes: 4 additions & 0 deletions Sources/Netlink80211/NL80211GetWiphyCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
//


#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
import Netlink
import NetlinkGeneric

Expand Down
4 changes: 4 additions & 0 deletions Sources/Netlink80211/NL80211Interface.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
// Created by Alsey Coleman Miller on 4/23/22.
//

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
import Netlink
import NetlinkGeneric

Expand Down
4 changes: 4 additions & 0 deletions Sources/Netlink80211/NL80211MulticastGroup.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
// Created by Alsey Coleman Miller on 7/7/18.
//

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_implementationOnly import CNetlink
import NetlinkGeneric

Expand Down
4 changes: 4 additions & 0 deletions Sources/Netlink80211/NL80211ScanResult.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
//


#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
import Netlink
import NetlinkGeneric

Expand Down
4 changes: 4 additions & 0 deletions Sources/Netlink80211/NL80211TriggerScanCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
// Created by Alsey Coleman Miller on 7/29/18.
//

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
import Netlink
import NetlinkGeneric

Expand Down
4 changes: 4 additions & 0 deletions Sources/Netlink80211/NL80211TriggerScanStatus.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
//


#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
import Netlink
import NetlinkGeneric

Expand Down
4 changes: 4 additions & 0 deletions Sources/Netlink80211/NL8021Wiphy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
// Created by Alsey Coleman Miller on 4/23/22.
//

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
import Netlink
import NetlinkGeneric

Expand Down
4 changes: 4 additions & 0 deletions Sources/Netlink80211/Netlink80211.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
// Created by Alsey Coleman Miller on 9/16/18.
//

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_implementationOnly import CNetlink
import Netlink
import NetlinkGeneric
Expand Down
4 changes: 4 additions & 0 deletions Sources/NetlinkGeneric/GenericFamilyController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
// Created by Alsey Coleman Miller on 7/28/18.
//

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
import Netlink
@_implementationOnly import CNetlink

Expand Down
Loading
Loading