/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1991, 1999 by Sun Microsystems, Inc.
* All rights reserved.
*/
#ident "%Z%%M% %I% %E% SMI" /* SunOS */
#include <setjmp.h>
#include <string.h>
#include <rpcsvc/bootparam_prot.h>
#include "snoop.h"
extern char *dlc_header;
static void show_address(char *);
static char *sum_address(void);
static char *procnames_short[] = {
"Null", /* 0 */
"WHOAMI?", /* 1 */
"GETFILE", /* 2 */
};
static char *procnames_long[] = {
"Null procedure", /* 0 */
"Who am I?", /* 1 */
"Get file name", /* 2 */
};
void
char *data;
int len;
{
char *line;
return;
return;
}
line = get_sum_line();
"BPARAM C %s",
switch (proc) {
case BOOTPARAMPROC_WHOAMI:
sum_address());
break;
case BOOTPARAMPROC_GETFILE:
(void) getxdr_string(buff,
MAX_FILEID));
break;
}
} else {
switch (proc) {
case BOOTPARAMPROC_WHOAMI:
(void) getxdr_string(buff,
(void) getxdr_string(buff2,
break;
case BOOTPARAMPROC_GETFILE:
(void) getxdr_string(buff,
(void) sum_address();
MAX_PATH_LEN));
break;
}
}
}
show_space();
return;
}
"Proc = %d (%s)",
switch (proc) {
case BOOTPARAMPROC_WHOAMI:
show_address("Client address");
break;
case BOOTPARAMPROC_GETFILE:
(void) showxdr_string(MAX_MACHINE_NAME,
"Hostname = %s");
(void) showxdr_string(MAX_FILEID,
"File = %s");
break;
}
} else {
switch (proc) {
case BOOTPARAMPROC_WHOAMI:
(void) showxdr_string(MAX_MACHINE_NAME,
"Client name = %s");
(void) showxdr_string(MAX_MACHINE_NAME,
"Domain name = %s");
show_address("Router addr");
break;
case BOOTPARAMPROC_GETFILE:
(void) showxdr_string(MAX_MACHINE_NAME,
"Server name = %s");
show_address("Server addr");
(void) showxdr_string(MAX_PATH_LEN,
"Server file = %s");
break;
}
}
show_trailer();
}
}
static char *
{
extern char *inet_ntoa();
int atype;
atype = getxdr_u_long();
if (atype != IP_ADDR_TYPE)
return ("?");
}
static void
char *label;
{
extern char *inet_ntoa();
int atype;
atype = getxdr_u_long();
if (atype == IP_ADDR_TYPE) {
"%s = %s (%s)",
} else {
"Router addr = ? (type not known)");
}
}