ObjFW
Toggle main menu visibility
Loading...
Searching...
No Matches
OFSystemInfo+NetworkInterfaces.h
1
/*
2
* Copyright (c) 2008-2026 Jonathan Schleifer <js@nil.im>
3
*
4
* All rights reserved.
5
*
6
* This program is free software: you can redistribute it and/or modify it
7
* under the terms of the GNU Lesser General Public License version 3.0 only,
8
* as published by the Free Software Foundation.
9
*
10
* This program is distributed in the hope that it will be useful, but WITHOUT
11
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13
* version 3.0 for more details.
14
*
15
* You should have received a copy of the GNU Lesser General Public License
16
* version 3.0 along with this program. If not, see
17
* <https://www.gnu.org/licenses/>.
18
*/
19
20
#import "OFSystemInfo.h"
21
22
OF_ASSUME_NONNULL_BEGIN
23
31
typedef
OFConstantString
*OFNetworkInterfaceKey;
32
39
typedef
OFDictionary
OF_GENERIC(OFNetworkInterfaceKey,
id
) *OFNetworkInterface;
40
41
#ifdef __cplusplus
42
extern
"C"
{
43
#endif
49
extern
const
OFNetworkInterfaceKey OFNetworkInterfaceIndex;
50
56
extern
const
OFNetworkInterfaceKey OFNetworkInterfaceHardwareAddress;
57
63
extern
const
OFNetworkInterfaceKey OFNetworkInterfaceIPv4Addresses;
64
65
#ifdef OF_HAVE_IPV6
71
extern
const
OFNetworkInterfaceKey OFNetworkInterfaceIPv6Addresses;
72
#endif
73
74
#ifdef OF_HAVE_IPX
80
extern
const
OFNetworkInterfaceKey OFNetworkInterfaceIPXAddresses;
81
#endif
82
83
#ifdef OF_HAVE_APPLETALK
89
extern
const
OFNetworkInterfaceKey OFNetworkInterfaceAppleTalkAddresses;
90
#endif
91
#ifdef __cplusplus
92
}
93
#endif
94
95
@interface
OFSystemInfo (NetworkInterfaces)
96
97
#ifdef OF_HAVE_CLASS_PROPERTIES
98
@property
(
class
, readonly, nullable, nonatomic)
99
OFDictionary OF_GENERIC(OFString *, OFNetworkInterface) *networkInterfaces;
100
#endif
101
108
+ (nullable
OFDictionary
OF_GENERIC(
OFString
*, OFNetworkInterface) *)
109
networkInterfaces
;
110
@end
111
112
OF_ASSUME_NONNULL_END
OFConstantString
A class for storing constant strings using the @"" literal.
Definition
OFConstantString.h:42
OFDictionary
An abstract class for storing objects in a dictionary.
Definition
OFDictionary.h:85
OFString
A class for handling strings.
Definition
OFString.h:144
+[OFSystemInfo networkInterfaces]
nullable OFDictionary * networkInterfaces()
Returns the available (though not necessarily configured) network interfaces.
src
OFSystemInfo+NetworkInterfaces.h
Generated by
1.17.0