ObjFW
Loading...
Searching...
No Matches
OFSystemInfo+NetworkInterfaces.h
1/*
2 * Copyright (c) 2008-2024 Jonathan Schleifer <js@nil.im>
3 *
4 * All rights reserved.
5 *
6 * This file is part of ObjFW. It may be distributed under the terms of the
7 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
8 * the packaging of this file.
9 *
10 * Alternatively, it may be distributed under the terms of the GNU General
11 * Public License, either version 2 or 3, which can be found in the file
12 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
13 * file.
14 */
15
16#import "OFSystemInfo.h"
17
18OF_ASSUME_NONNULL_BEGIN
19
26typedef OFDictionary OF_GENERIC(OFString *, id) *OFNetworkInterface;
27
36
42extern OFNetworkInterfaceKey OFNetworkInterfaceIndex;
43
49extern OFNetworkInterfaceKey OFNetworkInterfaceHardwareAddress;
50
56extern OFNetworkInterfaceKey OFNetworkInterfaceIPv4Addresses;
57
58#ifdef OF_HAVE_IPV6
64extern OFNetworkInterfaceKey OFNetworkInterfaceIPv6Addresses;
65#endif
66
67#ifdef OF_HAVE_IPX
73extern OFNetworkInterfaceKey OFNetworkInterfaceIPXAddresses;
74#endif
75
76#ifdef OF_HAVE_APPLETALK
82extern OFNetworkInterfaceKey OFNetworkInterfaceAppleTalkAddresses;
83#endif
84
85@interface OFSystemInfo (NetworkInterfaces)
86
87#ifdef OF_HAVE_CLASS_PROPERTIES
88@property (class, readonly, nullable, nonatomic)
89 OFDictionary OF_GENERIC(OFString *, OFNetworkInterface) *networkInterfaces;
90#endif
91
98+ (nullable OFDictionary OF_GENERIC(OFString *, OFNetworkInterface) *)
99 networkInterfaces;
100@end
101
102OF_ASSUME_NONNULL_END
A class for storing constant strings using the @"" literal.
Definition OFConstantString.h:38
An abstract class for storing objects in a dictionary.
Definition OFDictionary.h:80
A class for handling strings.
Definition OFString.h:135