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

(-)rarpd.c (-5 / +12 lines)
Lines 33-40 Link Here
33
/*
33
/*
34
 * rarpd - Reverse ARP Daemon
34
 * rarpd - Reverse ARP Daemon
35
 *
35
 *
36
 * Usage:	rarpd -a [ -dfsv ] [ hostname ]
36
 * Usage:	rarpd -a [ -dfsv ] [ -t directory ] [ hostname ]
37
 *		rarpd [ -dfsv ] interface [ hostname ]
37
 *		rarpd [ -dfsv ] [ -t directory ] interface [ hostname ]
38
 *
38
 *
39
 * 'hostname' is optional solely for backwards compatibility with Sun's rarpd.
39
 * 'hostname' is optional solely for backwards compatibility with Sun's rarpd.
40
 * Currently, the argument is ignored.
40
 * Currently, the argument is ignored.
Lines 129-135 Link Here
129
129
130
int verbose;			/* verbose messages */
130
int verbose;			/* verbose messages */
131
int s;				/* inet datagram socket */
131
int s;				/* inet datagram socket */
132
const char *tftp_dir = TFTP_DIR;	/* tftp directory */
132
char *tftp_dir = TFTP_DIR;	/* tftp directory */
133
133
134
int dflag;			/* messages to stdout/stderr, not syslog(3) */
134
int dflag;			/* messages to stdout/stderr, not syslog(3) */
135
int sflag;			/* ignore /tftpboot */
135
int sflag;			/* ignore /tftpboot */
Lines 164-169 Link Here
164
	int aflag = 0;		/* listen on "all" interfaces  */
164
	int aflag = 0;		/* listen on "all" interfaces  */
165
	int fflag = 0;		/* don't fork */
165
	int fflag = 0;		/* don't fork */
166
166
167
	extern char *optarg;
168
167
	if ((name = strrchr(argv[0], '/')) != NULL)
169
	if ((name = strrchr(argv[0], '/')) != NULL)
168
		++name;
170
		++name;
169
	else
171
	else
Lines 177-183 Link Here
177
	openlog(name, LOG_PID | LOG_CONS, LOG_DAEMON);
179
	openlog(name, LOG_PID | LOG_CONS, LOG_DAEMON);
178
180
179
	opterr = 0;
181
	opterr = 0;
180
	while ((op = getopt(argc, argv, "adfsv")) != -1) {
182
	while ((op = getopt(argc, argv, "adfst:v")) != -1) {
181
		switch (op) {
183
		switch (op) {
182
		case 'a':
184
		case 'a':
183
			++aflag;
185
			++aflag;
Lines 195-200 Link Here
195
			++sflag;
197
			++sflag;
196
			break;
198
			break;
197
199
200
		case 't':
201
			if(optarg)
202
				tftp_dir = optarg;
203
			break;
204
198
		case 'v':
205
		case 'v':
199
			++verbose;
206
			++verbose;
200
			break;
207
			break;
Lines 395-401 Link Here
395
void
402
void
396
usage(void)
403
usage(void)
397
{
404
{
398
	(void)fprintf(stderr, "usage: rarpd [-adfsv] [interface]\n");
405
	(void)fprintf(stderr, "usage: rarpd [-adfsv] [-t directory] [interface]\n");
399
	exit(1);
406
	exit(1);
400
}
407
}
401
408
(-)usr.sbin/rarpd/rarpd.8 (+6 lines)
Lines 28-33 Link Here
28
.Sh SYNOPSIS
28
.Sh SYNOPSIS
29
.Nm
29
.Nm
30
.Op Fl adfsv
30
.Op Fl adfsv
31
.Op Fl t Ar directory
31
.Op Ar interface
32
.Op Ar interface
32
.Sh DESCRIPTION
33
.Sh DESCRIPTION
33
.Nm
34
.Nm
Lines 93-98 Link Here
93
Supply a response to any RARP request for which an ethernet to IP address
94
Supply a response to any RARP request for which an ethernet to IP address
94
mapping exists; do not depend on the existence of
95
mapping exists; do not depend on the existence of
95
.Pa /tftpboot/\fIipaddr\fP* .
96
.Pa /tftpboot/\fIipaddr\fP* .
97
.It Fl t Ar directory
98
Use
99
.Pa directory
100
instead of
101
.Pa /tftpboot .
96
.It Fl v
102
.It Fl v
97
Enable verbose sysloging.
103
Enable verbose sysloging.
98
.El
104
.El

Return to bug 38126