View | Details | Raw Unified | Return to bug 197270 | Differences between
and this patch

Collapse All | Expand All

(-)af_inet6.c (-29 / +3 lines)
Lines 167-199 Link Here
167
}
167
}
168
168
169
static void
169
static void
170
in6_print_scope(uint8_t *a) 
171
{
172
	const char *sname = NULL;
173
	uint16_t val;
174
175
	val = (a[0] << 4) + ((a[1] & 0xc0) >> 4);
176
177
	if ((val & 0xff0) == 0xff0)
178
		sname = "Multicast";
179
	else {
180
		switch(val) {
181
			case 0xfe8:
182
				sname = "Link";
183
				break;
184
			case 0xfec:
185
				sname = "Site";
186
				break;
187
			default:
188
				sname = "Global";
189
				break;
190
		}
191
	}
192
193
	printf("scope: %s ", sname);
194
}
195
196
static void
197
in6_status(int s __unused, const struct ifaddrs *ifa)
170
in6_status(int s __unused, const struct ifaddrs *ifa)
198
{
171
{
199
	struct sockaddr_in6 *sin, null_sin;
172
	struct sockaddr_in6 *sin, null_sin;
Lines 284-291 Link Here
284
	if ((flags6 & IN6_IFF_PREFER_SOURCE) != 0)
257
	if ((flags6 & IN6_IFF_PREFER_SOURCE) != 0)
285
		printf("prefer_source ");
258
		printf("prefer_source ");
286
259
287
	in6_print_scope((uint8_t *)&((struct sockaddr_in6 *)
260
	if (((struct sockaddr_in6 *)(ifa->ifa_addr))->sin6_scope_id)
288
	    (ifa->ifa_addr))->sin6_addr);
261
		printf("scopeid 0x%x ",
262
		    ((struct sockaddr_in6 *)(ifa->ifa_addr))->sin6_scope_id);
289
263
290
	if (ip6lifetime && (lifetime.ia6t_preferred || lifetime.ia6t_expire)) {
264
	if (ip6lifetime && (lifetime.ia6t_preferred || lifetime.ia6t_expire)) {
291
		printf("pltime ");
265
		printf("pltime ");
(-)ifconfig.c (-1 / +1 lines)
Lines 235-241 Link Here
235
235
236
		if (af1 < ORDERS_SIZE(e1->af_orders) &&
236
		if (af1 < ORDERS_SIZE(e1->af_orders) &&
237
		    af2 < ORDERS_SIZE(e1->af_orders))
237
		    af2 < ORDERS_SIZE(e1->af_orders))
238
			return (e1->af_orders[af2] - e1->af_orders[af1]);
238
			return (e1->af_orders[af1] - e1->af_orders[af2]);
239
	}
239
	}
240
240
241
	return (0);
241
	return (0);

Return to bug 197270