View | Details | Raw Unified | Return to bug 27701
Collapse All | Expand All

(-)ifconfig.8 (+7 lines)
Lines 41-46 Link Here
41
.Sh SYNOPSIS
41
.Sh SYNOPSIS
42
.Nm
42
.Nm
43
.Op Fl L
43
.Op Fl L
44
.Op Fl m
44
.Ar interface
45
.Ar interface
45
.Op Ar address_family
46
.Op Ar address_family
46
.Oo
47
.Oo
Lines 52-57 Link Here
52
.Fl a
53
.Fl a
53
.Op Fl L
54
.Op Fl L
54
.Op Fl d
55
.Op Fl d
56
.Op Fl m
55
.Op Fl u
57
.Op Fl u
56
.Op Ar address_family
58
.Op Ar address_family
57
.Nm
59
.Nm
Lines 62-67 Link Here
62
.Nm
64
.Nm
63
.Op Fl L
65
.Op Fl L
64
.Op Fl d
66
.Op Fl d
67
.Op Fl m
65
.Op Fl u
68
.Op Fl u
66
.Sh DESCRIPTION
69
.Sh DESCRIPTION
67
.Nm Ifconfig
70
.Nm Ifconfig
Lines 530-535 Link Here
530
If the driver does supports the media selection system, the supported
533
If the driver does supports the media selection system, the supported
531
media list will be included in the output.
534
media list will be included in the output.
532
.Pp
535
.Pp
536
If the
537
.Fl m
538
flag is passed before an interface name, ifconfig will display all
539
of the supported media for the specified interface.
533
If
540
If
534
.Fl L
541
.Fl L
535
flag is supplied, address lifetime is displayed for IPv6 addresses,
542
flag is supplied, address lifetime is displayed for IPv6 addresses,
(-)ifconfig.c (-6 / +8 lines)
Lines 134-139 Link Here
134
134
135
struct	afswtch;
135
struct	afswtch;
136
136
137
int supmedia = 0;
138
137
#ifdef INET6
139
#ifdef INET6
138
char	addr_buf[MAXHOSTNAMELEN *2 + 1];	/*for getnameinfo()*/
140
char	addr_buf[MAXHOSTNAMELEN *2 + 1];	/*for getnameinfo()*/
139
#endif
141
#endif
Lines 351-366 Link Here
351
	fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n",
353
	fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n",
352
	"usage: ifconfig interface address_family [address [dest_address]]",
354
	"usage: ifconfig interface address_family [address [dest_address]]",
353
	"                [parameters]",
355
	"                [parameters]",
354
	"       ifconfig -a [-d] [-u] [address_family]",
356
	"       ifconfig -a [-d] [-m] [-u] [address_family]",
355
	"       ifconfig -l [-d] [-u] [address_family]",
357
	"       ifconfig -l [-d] [-u] [address_family]",
356
	"       ifconfig [-d] [-u]");
358
	"       ifconfig [-d] [-m] [-u]");
357
#else
359
#else
358
	fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n",
360
	fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n",
359
	"usage: ifconfig [-L] interface address_family [address [dest_address]]",
361
	"usage: ifconfig [-L] interface address_family [address [dest_address]]",
360
	"                [parameters]",
362
	"                [parameters]",
361
	"       ifconfig -a [-L] [-d] [-u] [address_family]",
363
	"       ifconfig -a [-L] [-d] [-m] [-u] [address_family]",
362
	"       ifconfig -l [-d] [-u] [address_family]",
364
	"       ifconfig -l [-d] [-u] [address_family]",
363
	"       ifconfig [-L] [-d] [-u]");
365
	"       ifconfig [-L] [-d] [-m] [-u]");
364
#endif
366
#endif
365
	exit(1);
367
	exit(1);
366
}
368
}
Lines 410-416 Link Here
410
			uponly++;
412
			uponly++;
411
			break;
413
			break;
412
		case 'm':	/* show media choices in status */
414
		case 'm':	/* show media choices in status */
413
			/* ignored for compatibility */
415
			supmedia = 1;
414
			break;
416
			break;
415
		default:
417
		default:
416
			usage();
418
			usage();
Lines 421-427 Link Here
421
	argv += optind;
423
	argv += optind;
422
424
423
	/* -l cannot be used with -a or -m */
425
	/* -l cannot be used with -a or -m */
424
	if (namesonly && all)
426
	if (namesonly && (all || supmedia))
425
		usage();
427
		usage();
426
428
427
	/* nonsense.. */
429
	/* nonsense.. */
(-)ifconfig.h (+1 lines)
Lines 38-43 Link Here
38
38
39
extern char name[32];	/* name of interface */
39
extern char name[32];	/* name of interface */
40
extern int allmedia;
40
extern int allmedia;
41
extern int supmedia;
41
struct afswtch;
42
struct afswtch;
42
43
43
extern void setmedia(const char *, int, int, const struct afswtch *rafp);
44
extern void setmedia(const char *, int, int, const struct afswtch *rafp);
(-)ifmedia.c (-4 / +4 lines)
Lines 164-176 Link Here
164
164
165
	putchar('\n');
165
	putchar('\n');
166
166
167
	if (ifmr.ifm_count > 0) {
167
	if (ifmr.ifm_count > 0 && supmedia) {
168
		printf("\tsupported media:");
168
		printf("\tsupported media:\n");
169
		for (i = 0; i < ifmr.ifm_count; i++) {
169
		for (i = 0; i < ifmr.ifm_count; i++) {
170
			putchar(' ');
170
			printf("\t\t");
171
			print_media_word(media_list[i]);
171
			print_media_word(media_list[i]);
172
			putchar('\n');
172
		}
173
		}
173
		putchar('\n');
174
	}
174
	}
175
175
176
	free(media_list);
176
	free(media_list);

Return to bug 27701