ObjFW  Diff

Differences From Artifact [d70a468c70]:

To Artifact [0a683cc5fa]:


112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128


129
130










131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#endif

#ifdef OF_HAVE_SOCKETS
	networkInterfaces = [OFSystemInfo networkInterfaces];
	[OFStdOut writeString: @"[OFSystemInfo] Network interfaces: "];
	for (OFString *name in networkInterfaces) {
		OFNetworkInterface interface;
		OFData *IPv4Addresses;

		if (!firstInterface)
			[OFStdOut writeString: @"; "];

		firstInterface = false;

		[OFStdOut writeFormat: @"%@(", name];

		interface = [networkInterfaces objectForKey: name];


		IPv4Addresses = [interface
		    objectForKey: OFNetworkInterfaceIPv4Addresses];











		for (size_t i = 0; i < IPv4Addresses.count; i++) {
			const OFSocketAddress *address =
			    [IPv4Addresses itemAtIndex: i];

			if (i > 0)
				[OFStdOut writeString: @", "];

			[OFStdOut writeString: OFSocketAddressString(address)];
		}

		[OFStdOut writeString: @")"];
	}
	[OFStdOut writeString: @"\n"];
#endif

	objc_autoreleasePoolPop(pool);
}
@end







|









>
>


>
>
>
>
>
>
>
>
>
>





|













112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
#endif

#ifdef OF_HAVE_SOCKETS
	networkInterfaces = [OFSystemInfo networkInterfaces];
	[OFStdOut writeString: @"[OFSystemInfo] Network interfaces: "];
	for (OFString *name in networkInterfaces) {
		OFNetworkInterface interface;
		OFData *IPv6Addresses, *IPv4Addresses;

		if (!firstInterface)
			[OFStdOut writeString: @"; "];

		firstInterface = false;

		[OFStdOut writeFormat: @"%@(", name];

		interface = [networkInterfaces objectForKey: name];
		IPv6Addresses = [interface
		    objectForKey: OFNetworkInterfaceIPv6Addresses];
		IPv4Addresses = [interface
		    objectForKey: OFNetworkInterfaceIPv4Addresses];

		for (size_t i = 0; i < IPv6Addresses.count; i++) {
			const OFSocketAddress *address =
			    [IPv6Addresses itemAtIndex: i];

			if (i > 0)
				[OFStdOut writeString: @", "];

			[OFStdOut writeString: OFSocketAddressString(address)];
		}

		for (size_t i = 0; i < IPv4Addresses.count; i++) {
			const OFSocketAddress *address =
			    [IPv4Addresses itemAtIndex: i];

			if (i > 0 || IPv6Addresses.count > 0)
				[OFStdOut writeString: @", "];

			[OFStdOut writeString: OFSocketAddressString(address)];
		}

		[OFStdOut writeString: @")"];
	}
	[OFStdOut writeString: @"\n"];
#endif

	objc_autoreleasePoolPop(pool);
}
@end