snoop_nfs4.c revision 2f172c55ef76964744bc62b4500ece87f3089b4d
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <ctype.h>
#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include <setjmp.h>
#include "snoop.h"
#include <rpcsvc/nfs_prot.h>
/* use the same nfs4_prot.h as the xdr code */
#include "rpcsvc/nfs4_prot.h"
/*
* XXX With NFS v2 and v3, we only need to xdr the pieces that we care
* about. Anything else we can ignore and just skip to the next packet.
* So all the stuff that deals directly with XDR lives in snoop_display.c
* With v4, we need to XDR entire structures so that we can skip over
* uninteresting bits in a compound array, so we call XDR directly from
* here. We need to rethink how we're going to structure XDR access. Do
* we continue to hide it all in snoop_display.c, or do we expose it to all
* the protocol modules?
*/
#ifndef MIN
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif
/*
* Maximum number of characters to display in compound4 summary line.
*/
#define SUM_COMPND_MAX 100
/*
* Maximum number of recognized attributes.
*/
#define MAX_ATTRIBUTES 56
/*
* This data structure provides a more convenient way to access an
* attribute bitmask. map[N] = value of bit N in a bitmap4.
* It's defined as a struct so as to step around all the weird rules in C
* about arrays, pointers, passing them as arguments, etc.
*/
typedef struct {
char map[MAX_ATTRIBUTES];
static void dtlarg_cb_getattr(void *obj);
static void dtlarg_cb_recall(void *obj);
static void dtlarg_access(void *obj);
static void dtlarg_close(void *obj);
static void dtlarg_commit(void *obj);
static void dtlarg_compnt(void *obj);
static void dtlarg_create(void *obj);
static void dtlarg_delprge(void *obj);
static void dtlarg_delret(void *obj);
static void dtlarg_getattr(void *obj);
static void dtlarg_link(void *obj);
static void dtlarg_lock(void *obj);
static void dtlarg_lockt(void *obj);
static void dtlarg_locku(void *obj);
static void dtlarg_lookup(void *obj);
static void dtlarg_open(void *obj);
static void dtlarg_openattr(void *obj);
static void dtlarg_open_confirm(void *obj);
static void dtlarg_open_downgrd(void *obj);
static void dtlarg_putfh(void *obj);
static void dtlarg_read(void *obj);
static void dtlarg_readdir(void *obj);
static void dtlarg_release_lkown(void *obj);
static void dtlarg_rename(void *obj);
static void dtlarg_renew(void *buf);
static void dtlarg_secinfo(void *obj);
static void dtlarg_setattr(void *obj);
static void dtlarg_setclid(void *obj);
static void dtlarg_setclid_cfm(void *obj);
static void dtlarg_verify(void *obj);
static void dtlarg_write(void *obj);
static void dtlres_cb_getattr(void *obj);
static void dtlres_access(void *obj);
static void dtlres_close(void *obj);
static void dtlres_commit(void *obj);
static void dtlres_create(void *obj);
static void dtlres_getattr(void *obj);
static void dtlres_getfh(void *obj);
static void dtlres_link(void *obj);
static void dtlres_lock(void *obj);
static void dtlres_lockt(void *obj);
static void dtlres_locku(void *obj);
static void dtlres_open(void *obj);
static void dtlres_open_confirm(void *obj);
static void dtlres_open_downgrd(void *obj);
static void dtlres_read(void *obj);
static void dtlres_readdir(void *obj);
static void dtlres_readlnk(void *obj);
static void dtlres_remove(void *obj);
static void dtlres_rename(void *obj);
static void dtlres_secinfo(void *obj);
static void dtlres_setattr(void *obj);
static void dtlres_setclid(void *obj);
static void dtlres_write(void *obj);
static void dtl_nfsstat4(void *obj);
static void nfs4_xdr_skip(int nbytes);
int nfs4_pkt_start;
int nfs4_pkt_len;
int nfs4_skip_bytes;
int nfs4_fragged_rpc;
char *nfs4err_fragrpc = "<Fragmented RPC>";
char *nfs4err_xdrfrag = "<XDR Error or Fragmented RPC>";
/*
* need a way to enable this if current testcases are parsing snoop
* error text. -- maybe an env var would do as temp workaround until
* testcases changed to grep for new error text.
*/
int nfs4_use_old_error_text = 0;
/*
* Information about each operation that can appear in a compound call.
* The function pointers are to formatting functions for summary arguments
* and results, and detail arguments & results.
*/
typedef struct {
char *name;
void (*dtlarg)(void *);
void (*dtlres)(void *);
} op_info_t;
static op_info_t cb_opcode_info[] = {
{"CB_GETATTR",
{"CB_RECALL",
};
static op_info_t opcode_info[] = {
{"ACCESS",
{"CLOSE",
{"COMMIT",
{"CREATE", /* 5 */
{"DELEGPURGE",
{"DELEGRETURN",
{"GETATTR",
{"GETFH",
{"LINK", /* 10 */
{"LOCK",
{"LOCKT",
{"LOCKU",
{"LOOKUP",
{"LOOKUPP", /* 15 */
{"NVERIFY",
{"OPEN",
{"OPENATTR",
{"OPEN_CONFIRM",
{"OPEN_DOWNGRADE",
{"PUTFH",
{"PUTPUBFH", /* 20 */
{"PUTROOTFH",
{"READ",
{"READDIR",
{"READLINK",
{"REMOVE", /* 25 */
{"RENAME",
{"RENEW",
{"RESTOREFH",
{"SAVEFH",
{"SECINFO", /* 30 */
{"SETATTR",
{"SETCLIENTID",
{"SETCLIENTID_CONFIRM",
{"VERIFY",
{"WRITE",
{"RELEASE_LOCKOWNER",
};
/*
* File types.
*/
typedef struct {
char *short_name; /* for summary output */
char *long_name; /* for detail output */
static ftype_names_t ftype_names[] = {
{"Type 0", "Type 0"},
{"REG", "Regular File"},
{"DIR", "Directory"},
{"BLK", "Block Device"},
{"CHR", "Character Device"},
{"LNK", "Symbolic Link"}, /* 5 */
{"SOCK", "Socket"},
{"FIFO", "FIFO"},
{"ATTRDIR", "Attribute Directory"},
{"NAMEDATTR", "Named Attribute"},
};
static ftype_names_t open_rflags[] = {
{"?", "UNKNOWN"}, /* 0 */
{"CF", "CONFIRM"}, /* 1 */
{"PL", "POSIX LOCK"}, /* 2 */
{"?", "UNKNOWN"},
};
static uint_t num_open_rflags =
#define sum_open_rflags(flag) \
#define detail_open_rflags(flag) \
static void prt_supported_attrs(XDR *);
static void prt_fh_expire_type(XDR *);
static void prt_change(XDR *);
static void prt_link_support(XDR *);
static void prt_symlink_support(XDR *);
static void prt_named_attr(XDR *);
static void prt_unique_handles(XDR *);
static void prt_lease_time(XDR *);
static void prt_rdattr_error(XDR *);
static void prt_aclsupport(XDR *);
static void prt_archive(XDR *);
static void prt_cansettime(XDR *);
static void prt_case_insensitive(XDR *);
static void prt_case_preserving(XDR *);
static void prt_chown_restricted(XDR *);
static void prt_filehandle(XDR *);
static void prt_fileid(XDR *);
static void prt_mounted_on_fileid(XDR *);
static void prt_files_avail(XDR *);
static void prt_files_free(XDR *);
static void prt_files_total(XDR *);
static void prt_fs_locations(XDR *);
static void prt_hidden(XDR *);
static void prt_homogeneous(XDR *);
static void prt_maxfilesize(XDR *);
static void prt_maxlink(XDR *);
static void prt_maxname(XDR *);
static void prt_maxread(XDR *);
static void prt_maxwrite(XDR *);
static void prt_mimetype(XDR *);
static void prt_no_trunc(XDR *);
static void prt_numlinks(XDR *);
static void prt_owner_group(XDR *);
static void prt_quota_avail_hard(XDR *);
static void prt_quota_avail_soft(XDR *);
static void prt_quota_used(XDR *);
static void prt_rawdev(XDR *);
static void prt_space_avail(XDR *);
static void prt_space_free(XDR *);
static void prt_space_total(XDR *);
static void prt_space_used(XDR *);
static void prt_system(XDR *);
static void prt_time_access(XDR *);
static void prt_time_access_set(XDR *);
static void prt_time_backup(XDR *);
static void prt_time_create(XDR *);
static void prt_time_delta(XDR *);
static void prt_time_metadata(XDR *);
static void prt_time_modify(XDR *);
static void prt_time_modify_set(XDR *);
/*
* Information for attributes.
* name name of the attribute.
* prt_details function to XDR decode the attribute and print it.
*
* XXX If this table ever gets extensively changed (including
* reorganization to track changes to the spec), it would probably be a
* good idea to change to a scheme where the table is mechanically
* kernel.
*/
typedef struct {
char *name;
void (*prt_details)(XDR *);
} attr_info_t;
{"SUPPORTED_ATTRS", prt_supported_attrs},
{"TYPE", prt_type},
{"FH_EXPIRE_TYPE", prt_fh_expire_type},
{"CHANGE", prt_change},
{"SIZE", prt_size},
{"SYMLINK_SUPPORT", prt_symlink_support},
{"NAMED_ATTR", prt_named_attr},
{"FSID", prt_fsid},
{"UNIQUE_HANDLES", prt_unique_handles},
{"RDATTR_ERROR", prt_rdattr_error},
{"ACL", prt_acl},
{"ACLSUPPORT", prt_aclsupport},
{"ARCHIVE", prt_archive},
{"CASE_INSENSITIVE", prt_case_insensitive},
{"CASE_PRESERVING", prt_case_preserving},
{"CHOWN_RESTRICTED", prt_chown_restricted},
{"FILEHANDLE", prt_filehandle},
{"FILES_AVAIL", prt_files_avail},
{"FILES_FREE", prt_files_free},
{"FILES_TOTAL", prt_files_total},
{"FS_LOCATIONS", prt_fs_locations},
{"HOMOGENEOUS", prt_homogeneous},
{"MAXFILESIZE", prt_maxfilesize},
{"MAXLINK", prt_maxlink},
{"MAXNAME", prt_maxname},
{"MAXWRITE", prt_maxwrite},
{"MIMETYPE", prt_mimetype},
{"MODE", prt_mode},
{"NO_TRUNC", prt_no_trunc},
{"OWNER", prt_owner},
{"OWNER_GROUP", prt_owner_group},
{"QUOTA_AVAIL_HARD", prt_quota_avail_hard},
{"QUOTA_AVAIL_SOFT", prt_quota_avail_soft},
{"RAWDEV", prt_rawdev},
{"SPACE_AVAIL", prt_space_avail},
{"SPACE_FREE", prt_space_free},
{"SPACE_TOTAL", prt_space_total},
{"SYSTEM", prt_system},
{"TIME_ACCESS", prt_time_access},
{"TIME_ACCESS_SET", prt_time_access_set},
{"TIME_BACKUP", prt_time_backup},
{"TIME_DELTA", prt_time_delta},
{"TIME_METADATA", prt_time_metadata},
{"TIME_MODIFY", prt_time_modify},
{"TIME_MODIFY_SET", prt_time_modify_set},
{"MOUNTED_ON_FILEID", prt_mounted_on_fileid},
};
extern char *get_sum_line();
static void sum_comp4res(char *, char *(*)(void));
static char *sum_compound4args(void);
static char *sum_compound4res(void);
static char *sum_cb_compound4args(void);
static char *sum_cb_compound4res(void);
static void detail_acetype4(acetype4);
static void detail_uint32_bitmap(uint32_t, char *[], int);
static void detail_aceflag4(aceflag4);
static void detail_acemask4(acemask4);
static void detail_nfs_argop4(void);
static void detail_nfs_resop4(void);
static void detail_cb_argop4(void);
static void detail_cb_resop4(void);
static char *lock_type_name(enum nfs_lock_type4);
static char *opcode_name(uint_t);
static char *status_name(int);
static char *status_name_compat(int);
static char *status_name_pcol(int);
static char *sum_type_name(nfs_ftype4);
static void detail_access4(char *, uint32_t);
static void detail_rpcsec_gss(rpcsec_gss_info *);
static char *detail_type_name(nfs_ftype4);
static void showxdr_utf8string(char *);
static char *utf8localize(utf8string *);
static void utf8free(void);
#define SPECIAL_STATEID0 "SPC0"
#define SPECIAL_STATEID1 "SPC1"
#define DONT_CHANGE 0
#define SET_TO_SERVER_TIME 1
#define SET_TO_CLIENT_TIME 2
static stateid4 spec_stateid_0 =
{0, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
static stateid4 spec_stateid_1 =
{0xFFFFFFFF, {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}};
static char *procnames_short[] = {
"NULL4", /* 0 */
"COMPOUND4" /* 1 */
};
static char *procnames_long[] = {
"Null procedure", /* 0 */
"Compound", /* 1 */
};
static char *cb_procnames_short[] = {
"CB_NULL", /* 0 */
"CB_COMPOUND" /* 1 */
};
static char *cb_procnames_long[] = {
"Null CallBack procedure", /* 0 */
"CallBack compound", /* 1 */
};
static char *acetype4_names[] = {
"ACE4_ACCESS_ALLOWED_ACE_TYPE",
"ACE4_ACCESS_DENIED_ACE_TYPE",
"ACE4_SYSTEM_AUDIT_ACE_TYPE",
"ACE4_SYSTEM_ALARM_ACE_TYPE"
};
#define ACETYPE4_NAMES_MAX (sizeof (acetype4_names) / sizeof (char *))
static char *aceflag4_names[] = {
"ACE4_FILE_INHERIT_ACE",
"ACE4_DIRECTORY_INHERIT_ACE",
"ACE4_NO_PROPAGATE_INHERIT_ACE",
"ACE4_INHERIT_ONLY_ACE",
"ACE4_SUCCESSFUL_ACCESS_ACE_FLAG",
"ACE4_FAILED_ACCESS_ACE_FLAG",
"ACE4_IDENTIFIER_GROUP"
};
#define ACEFLAG4_NAMES_MAX (sizeof (aceflag4_names) / sizeof (char *))
static char *acemask4_names[] = {
"ACE4_READ_NAMED_ATTRS",
"ACE4_WRITE_NAMED_ATTRS",
"ACE4_EXECUTE",
"ACE4_DELETE_CHILD",
"ACE4_READ_ATTRIBUTES",
"ACE4_WRITE_ATTRIBUTES",
"UNDEFINED", /* 0x00000200 */
"UNDEFINED", /* 0x00000400 */
"UNDEFINED", /* 0x00000800 */
"UNDEFINED", /* 0x00001000 */
"UNDEFINED", /* 0x00002000 */
"UNDEFINED", /* 0x00004000 */
"UNDEFINED", /* 0x00008000 */
"ACE4_DELETE",
"ACE4_READ_ACL",
"ACE4_WRITE_ACL",
"ACE4_WRITE_OWNER",
"ACE4_SYNCHRONIZE"
};
#define ACEMASK4_NAMES_MAX (sizeof (acemask4_names) / sizeof (char *))
#define MAXPROC 1
/*ARGSUSED*/
void
{
return;
line = get_sum_line();
if (proc == CB_COMPOUND) {
static utf8string tag;
utf8localize(&tag),
}
} else {
if (proc == CB_COMPOUND)
}
}
show_space();
if (proc == CB_COMPOUND) {
showxdr_utf8string("Tag = %s");
} else {
status = getxdr_long();
showxdr_utf8string("Tag = %s");
}
}
show_trailer();
}
utf8free(); /* cf. utf8localize() */
}
/*ARGSUSED*/
void
{
return;
nfs4_fragged_rpc = 0;
nfs4_pkt_len = len;
line = get_sum_line();
if (proc == NFSPROC4_COMPOUND) {
static utf8string tag;
utf8localize(&tag),
}
} else {
if (proc == NFSPROC4_COMPOUND)
}
}
show_space();
if (proc == NFSPROC4_COMPOUND) {
showxdr_utf8string("Tag = %s");
} else {
status = getxdr_long();
showxdr_utf8string("Tag = %s");
}
}
show_trailer();
}
utf8free(); /* cf. utf8localize() */
}
/*
* Return the names and arguments of the oplist elements, up to
* SUM_COMPND_MAX characters. If the elements don't fit, include a "..."
* at the end of the string.
*/
static char *
sum_compound4args(void)
{
int numops;
char *bp;
buf[0] = '\0';
return (buf);
}
/*
* might be nice to print minor version, but doesn't
* seem like very useful info for summary mode
*/
numops = getxdr_long();
while (numops-- > 0) {
char *operand;
}
}
/* nfs4_skip_bytes set by xdr_nfs4_argop4 */
if (nfs4_skip_bytes != 0)
/* add "..." if past the "end" of the buffer */
"...");
break;
}
}
return (buf);
}
static void
nfs4_xdr_skip(int nbytes)
{
/*
* frag, we must skip over it to process the rest of
* the packet.
*
* nfs4_pkt_start: XDR position of start of NFS4 compound
* nfs4_pkt_len: number of bytes in pkt relative to
* nfs4_pkt_start
*
* cur_pos: current XDR position
* off: current XDR position relative to nfs4_pkt_start
* resid: number of unprocessed bytes in current pkt
*
* packet. Otherwise, set the fragged flag so we can
* display the fragged_rpc message.
*/
/*
* set nfs4_fragged_rpc if the requested number of "skip"
* bytes is larger than the bytes remaining in the XDR
* start of interpret_nfs4.
*/
/* there's nothing to do for error case (if it fails pkt is doomed) */
}
/*
* Return the names and arguments of the oplist elements, up to
* SUM_COMPND_MAX characters. If the elements don't fit, include a "..."
* at the end of the string.
*/
static char *
sum_cb_compound4args(void)
{
int numops;
char *bp;
buf[0] = '\0';
" RPC>");
return (buf);
}
/*
* might be nice to print minor version, but doesn't
* seem like very useful info for summary mode
*/
/* print callback_ident */
numops = getxdr_long();
while (numops-- > 0) {
char *operand;
}
}
/* add "..." if past the "end" of the buffer */
"...");
break;
}
}
return (buf);
}
/*
* Return the summarized argument list for the given nfs_argop4.
*/
static char *
{
static char buf[1024];
buf[0] = '\0';
}
return (buf);
}
/*
* Return the summarized argument list for the given nfs_argop4.
*/
static char *
{
static char buf[1024];
buf[0] = '\0';
}
return (buf);
}
/*
* Print details about the nfs_argop4 that is next in the XDR stream.
*/
static void
detail_nfs_argop4(void)
{
int numops;
void (*fmtproc)(void *);
numops = getxdr_long();
numops);
while (numops-- > 0) {
}
get_line(0, 0); /* blank line to separate ops */
}
/* nfs4_skip_bytes set by xdr_nfs_argop4() */
if (nfs4_skip_bytes)
}
}
/*
* Print details about the nfs_argop4 that is next in the XDR stream.
*/
static void
detail_cb_argop4(void)
{
int numops;
void (*fmtproc)(void *);
numops = getxdr_long();
numops);
while (numops-- > 0) {
}
get_line(0, 0); /* blank line to separate ops */
}
}
}
/*
* component_name: return a printable string for the given component4. I'm
* leaving this as a separate function (as opposed to having the callers
* call utf8localize() directly) in case the definition of component4
* changes.
*/
static char *
{
return (utf8localize(cp));
}
/*
* linktext_name. cf. component_name().
*/
static char *
{
return (utf8localize(lp));
}
/*
* stable_how4_name: return a string for "how".
*/
static char *
{
char *result;
switch (how) {
case UNSTABLE4:
result = "ASYNC";
break;
case DATA_SYNC4:
result = "DSYNC";
break;
case FILE_SYNC4:
result = "FSYNC";
break;
default:
result = "?";
break;
}
return (result);
}
/*
* sum_open_share_access: return a string corresponding to the
* given OPEN share access bitmask.
*/
static char *
{
char *result;
switch (mask) {
case 0:
result = "N";
break;
case OPEN4_SHARE_ACCESS_READ:
result = "R";
break;
case OPEN4_SHARE_ACCESS_WRITE:
result = "W";
break;
case OPEN4_SHARE_ACCESS_BOTH:
result = "RW";
break;
default:
result = "?";
break;
}
return (result);
}
/*
* sum_open_share_deny: return a string corresponding to the
* given OPEN share deny bitmask.
*/
static char *
{
char *result;
switch (mask) {
case OPEN4_SHARE_DENY_NONE:
result = "N";
break;
case OPEN4_SHARE_DENY_READ:
result = "R";
break;
case OPEN4_SHARE_DENY_WRITE:
result = "W";
break;
case OPEN4_SHARE_DENY_BOTH:
result = "RW";
break;
default:
result = "?";
break;
}
return (result);
}
static int
{
return (0);
return (1);
return (-1);
}
static char *
{
static char buf[32];
int spec;
else
return (buf);
}
static void
{
int spec;
char seqstr[32] = {0};
if (spec < 0)
else
spec == 0 ? "SPECIAL_0" :
/*
* If spec 0/1 stateid, print seqid in hex; otherwise,
* use decimal. This makes it more clear how spec stateids
* are constructed [obvious that either all bits are 0, or all
* bits are 1].
*/
if (spec == -1)
else
}
static char *
{
static char buf[64];
return (buf);
}
static void
{
}
/*
* sum_createhow4: return the string name of "how".
*/
static char *
{
char *result;
case UNCHECKED4:
result = "UNCHECKED";
break;
case GUARDED4:
result = "GUARDED";
break;
case EXCLUSIVE4:
result = "EXCLUSIVE";
break;
default:
result = "?";
break;
}
return (result);
}
/*
* detail_createhow4: print detail information about "how".
*/
static void
{
case UNCHECKED4:
case GUARDED4:
break;
case EXCLUSIVE4:
break;
}
}
static void
{
case NF4LNK:
break;
case NF4BLK:
case NF4CHR:
break;
default:
break;
}
}
static void
{
}
static void
dtlarg_access(void *obj)
{
}
static void
{
}
static void
dtlarg_close(void *obj)
{
}
static void
{
}
static void
dtlarg_commit(void *obj)
{
}
static void
{
}
static void
dtlarg_compnt(void *obj)
{
}
static void
{
}
static void
dtlarg_create(void *obj)
{
}
static void
{
}
static void
dtlarg_delprge(void *obj)
{
}
static void
{
}
static void
dtlarg_delret(void *obj)
{
}
static void
{
}
static void
dtlarg_getattr(void *obj)
{
}
static void
{
}
static void
dtlarg_cb_getattr(void *obj)
{
}
static void
{
}
static void
dtlarg_cb_recall(void *obj)
{
}
/*
* name openhow seqid claim access deny owner
*/
static void
{
}
static void
dtlarg_open(void *obj)
{
}
static void
{
}
static void
dtlarg_openattr(void *obj)
{
}
static void
{
}
static void
dtlarg_open_confirm(void *obj)
{
}
static void
{
}
static void
dtlarg_open_downgrd(void *obj)
{
}
static void
{
}
static void
dtlarg_putfh(void *obj)
{
}
static void
{
}
static void
dtlarg_link(void *obj)
{
}
static void
{
}
static void
{
}
static void
{
else
}
static char *
{
char *result;
switch (type) {
case READ_LT:
result = "RD";
break;
case WRITE_LT:
result = "WR";
break;
case READW_LT:
result = "RDW";
break;
case WRITEW_LT:
result = "WRW";
break;
default:
result = "?";
break;
}
return (result);
}
static void
{
}
static void
{
}
static void
{
}
static void
{
else
}
static void
dtlarg_lock(void *obj)
{
}
static void
{
}
static void
dtlarg_lockt(void *obj)
{
}
static void
{
}
static void
dtlarg_locku(void *obj)
{
}
static void
{
}
static void
dtlarg_lookup(void *obj)
{
}
static void
{
}
static void
dtlarg_read(void *obj)
{
}
static void
{
}
static void
dtlarg_readdir(void *obj)
{
}
static void
dtlarg_release_lkown(void *obj)
{
}
static void
{
}
static void
{
}
static void
dtlarg_rename(void *obj)
{
}
static void
{
}
static void
dtlarg_renew(void *obj)
{
}
static void
{
}
static void
dtlarg_secinfo(void *obj)
{
}
static void
{
}
static void
dtlarg_setattr(void *obj)
{
}
static void
{
}
static void
dtlarg_setclid(void *obj)
{
}
static void
{
}
static void
dtlarg_setclid_cfm(void *obj)
{
}
static void
dtlarg_verify(void *obj)
{
}
static void
{
}
static void
dtlarg_write(void *obj)
{
}
static char *
{
static char buf[20];
return (buf);
}
static void
{
int i;
char *bufp;
/* XXX use tohex()? */
i < fh->nfs_fh4_len;
i++, cp++) {
if (i != 0 && i % 32 == 0)
}
}
static void
{
goto done;
}
}
}
done:
}
static void
{
char *bp;
buf[0] = '\0';
"<Too Long>");
return;
}
}
}
/*
* Print detail information for the given attribute bitmap, and fill in the
* unpacked version of the map if "unpacked" is non-null. Returns the
* number of bytes in the bitmap. "prefix" is an initial string that is
* printed at the front of each line.
*/
static void
{
/*
* Break the bitmap into octets, then print in hex and
* symbolically.
*/
int bit;
1;
}
}
}
}
}
/*
* Format the summary line results from a COMPOUND4 call.
*/
static void
{
static utf8string tag;
status = getxdr_long();
}
/*
* Return a set of summary strings for the result data that's next in the
* XDR stream, up to SUM_COMPND_MAX characters. If the strings don't fit,
* include a "..." at the end of the string.
*/
static char *
sum_compound4res(void)
{
int numres;
char *bp;
buf[0] = '\0';
return (buf);
}
numres = getxdr_long();
while (numres-- > 0) {
char *result;
}
}
/* nfs4_skip_bytes set by xdr_nfs4_argop4() */
if (nfs4_skip_bytes != 0)
/* add "..." if past the "end" of the buffer */
"...");
break;
}
}
return (buf);
}
/*
* Return a set of summary strings for the result data that's next in the
* XDR stream, up to SUM_COMPND_MAX characters. If the strings don't fit,
* include a "..." at the end of the string.
*/
static char *
sum_cb_compound4res(void)
{
int numres;
char *bp;
buf[0] = '\0';
" RPC>");
return (buf);
}
numres = getxdr_long();
while (numres-- > 0) {
}
sum_cb_result(&one_res));
/* add "..." if past the "end" of the buffer */
"...");
break;
}
}
return (buf);
}
/*
* Return the summarized results for the given resultdata.
*/
static char *
{
static char buf[1024];
buf[0] = '\0';
else
return (buf);
}
/*
* Return the summarized results for the given resultdata.
*/
static char *
{
static char buf[1024];
buf[0] = '\0';
else
return (buf);
}
static void
{
}
static void
{
/* XXX print as time_t, too? */
}
static void
{
}
static void
dtl_nfsstat4(void *obj)
{
}
static void
{
}
}
static void
dtlres_access(void *obj)
{
detail_access4("Supported Attributes",
detail_access4("Allowed Attributes",
}
}
static void
{
}
static void
dtlres_close(void *obj)
{
}
}
static void
{
}
static void
dtlres_commit(void *obj)
{
}
}
static void
dtlres_create(void *obj)
{
dtl_change_info("Change Information",
NULL);
}
}
static void
{
}
static void
dtlres_getattr(void *obj)
{
}
}
static void
{
}
static void
dtlres_cb_getattr(void *obj)
{
}
}
static void
{
char *bp;
}
}
static void
dtlres_getfh(void *obj)
{
}
}
static void
dtlres_link(void *obj)
{
dtl_change_info("Change Information",
}
}
static void
{
char *bp;
}
}
}
static void
dtlres_lock(void *obj)
{
}
}
}
static void
{
char *bp;
}
}
static void
dtlres_lockt(void *obj)
{
}
}
static void
{
char *bp;
}
static void
dtlres_locku(void *obj)
{
}
static void
{
}
}
}
static void
dtlres_open(void *obj)
{
dtl_change_info("Change Information",
NULL);
}
}
static void
{
char *bp;
open_stateid));
}
}
static void
dtlres_open_confirm(void *obj)
{
}
}
static void
{
char *bp;
open_stateid));
}
}
static void
dtlres_open_downgrd(void *obj)
{
}
}
static void
{
char *bp;
}
}
static void
dtlres_read(void *obj)
{
}
}
static void
{
char *bp;
int num_entries = 0;
num_entries++;
? "No more" : "More");
}
}
static void
dtlres_readdir(void *obj)
{
int num_entries = 0;
num_entries++;
"------------------ entry #%d",
}
if (num_entries == 0)
}
}
static void
{
char *bp;
}
}
static void
dtlres_readlnk(void *obj)
{
}
}
static void
dtlres_remove(void *obj)
{
dtl_change_info("Change Information",
}
}
static void
dtlres_rename(void *obj)
{
dtl_change_info("Source Change Information",
dtl_change_info("Target Change Information",
}
}
static void
{
char *bp;
numinfo != 0;
}
}
}
static void
dtlres_secinfo(void *obj)
{
numinfo != 0;
}
}
}
static void
{
}
static void
dtlres_setattr(void *obj)
{
}
static void
{
char *bp;
case NFS_OK:
break;
case NFS4ERR_CLID_INUSE:
break;
}
}
static void
dtlres_setclid(void *obj)
{
case NFS_OK:
break;
case NFS4ERR_CLID_INUSE:
break;
}
}
static void
{
char *bp;
}
}
static void
dtlres_write(void *obj)
{
}
}
/*
* Print details about the nfs_resop4 that is next in the XDR stream.
*/
static void
detail_nfs_resop4(void)
{
int numres;
void (*fmtproc)(void *);
numres = getxdr_long();
numres);
while (numres-- > 0) {
}
get_line(0, 0); /* blank line to separate ops */
else
/* nfs4_skip_bytes set by xdr_nfs_resop4()() */
if (nfs4_skip_bytes)
}
}
/*
* Print details about the nfs_cb_resop4 that is next in the XDR stream.
*/
static void
detail_cb_resop4(void)
{
int numres;
void (*fmtproc)(void *);
numres = getxdr_long();
numres);
while (numres-- > 0) {
get_line(0, 0); /* blank line to separate ops */
else
}
}
/*
* Return the name of a lock type.
*/
static char *
{
char *result;
switch (type) {
case READ_LT:
result = "READ";
break;
case WRITE_LT:
result = "WRITE";
break;
case READW_LT:
result = "READW";
break;
case WRITEW_LT:
result = "WRITEW";
break;
default:
result = "?";
break;
}
return (result);
}
/*
* Return the name of an opcode.
*/
static char *
{
static char buf[20];
if (opnum < num_opcodes)
if (opnum == OP_ILLEGAL)
return ("ILLEGAL");
return (buf);
}
/*
* Return the name of an opcode.
*/
static char *
{
static char buf[20];
if (opnum < cb_num_opcodes)
if (opnum == OP_CB_ILLEGAL)
return ("CB_ILLEGAL");
return (buf);
}
/*
* Fill in a summary string for the given access bitmask.
*/
static void
{
buf[0] = '\0';
if (bits & ACCESS4_READ)
if (bits & ACCESS4_LOOKUP)
if (bits & ACCESS4_MODIFY)
if (bits & ACCESS4_EXTEND)
if (bits & ACCESS4_DELETE)
if (bits & ACCESS4_EXECUTE)
if (buf[0] != '\0')
}
/*
* Print detail information about the given access bitmask.
*/
static void
{
}
/*
* Fill in a summary string for the given open_claim4.
*/
static void
{
case CLAIM_NULL:
break;
case CLAIM_PREVIOUS:
break;
case CLAIM_DELEGATE_CUR:
break;
case CLAIM_DELEGATE_PREV:
break;
}
}
/*
* Fill in a summary string for the given open_claim4.
*/
static void
{
case CLAIM_NULL:
break;
case CLAIM_PREVIOUS:
break;
case CLAIM_DELEGATE_CUR:
break;
case CLAIM_DELEGATE_PREV:
break;
default:
break;
}
}
static char *
{
char *str = "";
switch (dt) {
case OPEN_DELEGATE_NONE:
str = "N";
break;
case OPEN_DELEGATE_READ:
str = "R";
break;
case OPEN_DELEGATE_WRITE:
str = "W";
break;
default:
str = "?";
}
return (str);
}
/*
* Print detail information for the given open_claim4.
*/
static void
{
case CLAIM_NULL:
break;
case CLAIM_PREVIOUS:
break;
case CLAIM_DELEGATE_CUR:
break;
case CLAIM_DELEGATE_PREV:
break;
}
}
/*
* Return a summary string for the given clientid4.
*/
static char *
{
static char buf[50];
return (buf);
}
/*
* Print a detail string for the given clientid4.
*/
static void
{
}
/*
* Write a summary string for the given delegation into buf.
*/
static void
{
switch (delp->delegation_type) {
case OPEN_DELEGATE_NONE:
break;
case OPEN_DELEGATE_READ:
stateid));
break;
case OPEN_DELEGATE_WRITE:
stateid),
space_limit));
break;
default:
break;
}
}
static void
{
switch (delp->delegation_type) {
case OPEN_DELEGATE_NONE:
/* no-op */
break;
case OPEN_DELEGATE_READ:
"TRUE" : "FALSE");
break;
case OPEN_DELEGATE_WRITE:
"TRUE" : "FALSE");
break;
}
}
static void
{
}
static void
{
}
static void
{
case UNCHECKED4:
break;
case GUARDED4:
break;
case EXCLUSIVE4:
break;
default:
break;
}
} else
}
static void
{
}
/*
* Fill in buf with the given path.
*/
static void
{
component++) {
}
}
static void
{
}
static void
{
}
static void
{
}
}
/*
* Print detail information about the rpcsec_gss_info that is XDR-encoded
* at mem.
*/
static void
{
}
/*
* Print detail information about the given secinfo4.
*/
static void
{
case RPCSEC_GSS:
break;
}
}
/*
* Return a summary string corresponding to the given nfs_space_limit4.
*/
static char *
{
static char buf[64];
buf[0] = '\0';
case NFS_LIMIT_SIZE:
break;
case NFS_LIMIT_BLOCKS:
break;
default:
break;
}
return (buf);
}
/*
* Print detail information about the given nfs_space_limit4.
*/
static void
{
case NFS_LIMIT_SIZE:
break;
case NFS_LIMIT_BLOCKS:
break;
}
}
/*
* Return the short name of a file type.
*/
static char *
{
static char buf[20];
if (type < num_ftypes)
else {
return (buf);
}
}
/*
*/
static char *
char *prefix)
{
static char buf[200];
*bp = '\0';
if (prefix) {
}
for (i = 0; i < 32; i++)
if (flag & (1 << i)) {
}
if (fn)
else
*buf = '\0';
return (buf);
}
/*
* Return the long name of a file type.
*/
static char *
{
static char buf[20];
if (type < num_ftypes)
else {
return (buf);
}
}
/*
* Return the name of an attribute.
*/
static char *
{
static char buf[20];
if (attrnum < MAX_ATTRIBUTES)
else {
return (buf);
}
}
/*
* Return the name of the given open_claim_type4.
*/
static char *
{
char *result;
switch (claim_type) {
case CLAIM_NULL:
result = "NULL";
break;
case CLAIM_PREVIOUS:
result = "PREVIOUS";
break;
case CLAIM_DELEGATE_CUR:
result = "DELEGATE CURRENT";
break;
case CLAIM_DELEGATE_PREV:
result = "DELEGATE PREVIOUS";
break;
default:
result = "?";
break;
}
return (result);
}
/*
* Return a string naming the given delegation.
*/
static char *
{
char *result;
switch (type) {
case OPEN_DELEGATE_NONE:
result = "NONE";
break;
case OPEN_DELEGATE_READ:
result = "READ";
break;
case OPEN_DELEGATE_WRITE:
result = "WRITE";
break;
default:
result = "?";
break;
}
return (result);
}
/*
* Return the name of the given authentication flavor.
*/
static char *
{
char *result;
static char buf[50];
switch (flavor) {
case AUTH_SYS:
result = "AUTH_SYS";
break;
case AUTH_NONE:
result = "AUTH_NONE";
break;
case AUTH_DH:
result = "AUTH_DH";
break;
case RPCSEC_GSS:
result = "RPCSEC_GSS";
break;
default:
break;
}
return (result);
}
/*
* Return the name of the given rpc_gss_svc_t.
*/
static char *
{
char *result;
static char buf[50];
switch (svc) {
case RPC_GSS_SVC_NONE:
result = "NONE";
break;
case RPC_GSS_SVC_INTEGRITY:
result = "INTEGRITY";
break;
case RPC_GSS_SVC_PRIVACY:
result = "PRIVACY";
break;
default:
break;
}
return (result);
}
/*
* Return a string name for the given limit_by4.
*/
static char *
{
char *result;
switch (limitby) {
case NFS_LIMIT_SIZE:
result = "SIZE";
break;
case NFS_LIMIT_BLOCKS:
result = "BLOCKS";
break;
default:
result = "?";
break;
}
return (result);
}
static char *
status_name(int status)
{
char *p;
switch (status) {
case NFS4_OK: p = "NFS4_OK"; break;
case NFS4ERR_PERM: p = "NFS4ERR_PERM"; break;
case NFS4ERR_NOENT: p = "NFS4ERR_NOENT"; break;
case NFS4ERR_IO: p = "NFS4ERR_IO"; break;
case NFS4ERR_NXIO: p = "NFS4ERR_NXIO"; break;
case NFS4ERR_ACCESS: p = "NFS4ERR_ACCESS"; break;
case NFS4ERR_EXIST: p = "NFS4ERR_EXIST"; break;
case NFS4ERR_XDEV: p = "NFS4ERR_XDEV"; break;
case NFS4ERR_NOTDIR: p = "NFS4ERR_NOTDIR"; break;
case NFS4ERR_ISDIR: p = "NFS4ERR_ISDIR"; break;
case NFS4ERR_INVAL: p = "NFS4ERR_INVAL"; break;
case NFS4ERR_FBIG: p = "NFS4ERR_FBIG"; break;
case NFS4ERR_NOSPC: p = "NFS4ERR_NOSPC"; break;
case NFS4ERR_ROFS: p = "NFS4ERR_ROFS"; break;
case NFS4ERR_MLINK: p = "NFS4ERR_MLINK"; break;
case NFS4ERR_NAMETOOLONG:p = "NFS4ERR_NAMETOOLONG"; break;
case NFS4ERR_NOTEMPTY: p = "NFS4ERR_NOTEMPTY"; break;
case NFS4ERR_DQUOT: p = "NFS4ERR_DQUOT"; break;
case NFS4ERR_STALE: p = "NFS4ERR_STALE"; break;
case NFS4ERR_BADHANDLE: p = "NFS4ERR_BADHANDLE"; break;
case NFS4ERR_BAD_COOKIE:p = "NFS4ERR_BAD_COOKIE"; break;
case NFS4ERR_NOTSUPP: p = "NFS4ERR_NOTSUPP"; break;
case NFS4ERR_TOOSMALL: p = "NFS4ERR_TOOSMALL"; break;
case NFS4ERR_SERVERFAULT:p = "NFS4ERR_SERVERFAULT"; break;
case NFS4ERR_BADTYPE: p = "NFS4ERR_BADTYPE"; break;
case NFS4ERR_DELAY: p = "NFS4ERR_DELAY"; break;
case NFS4ERR_SAME: p = "NFS4ERR_SAME"; break;
case NFS4ERR_DENIED: p = "NFS4ERR_DENIED"; break;
case NFS4ERR_EXPIRED: p = "NFS4ERR_EXPIRED"; break;
case NFS4ERR_LOCKED: p = "NFS4ERR_LOCKED"; break;
case NFS4ERR_GRACE: p = "NFS4ERR_GRACE"; break;
case NFS4ERR_FHEXPIRED: p = "NFS4ERR_FHEXPIRED"; break;
case NFS4ERR_SHARE_DENIED: p = "NFS4ERR_SHARE_DENIED"; break;
case NFS4ERR_WRONGSEC: p = "NFS4ERR_WRONGSEC"; break;
case NFS4ERR_CLID_INUSE: p = "NFS4ERR_CLID_INUSE"; break;
case NFS4ERR_RESOURCE: p = "NFS4ERR_RESOURCE"; break;
case NFS4ERR_MOVED: p = "NFS4ERR_MOVED"; break;
case NFS4ERR_NOFILEHANDLE: p = "NFS4ERR_NOFILEHANDLE"; break;
case NFS4ERR_MINOR_VERS_MISMATCH: p = "NFS4ERR_MINOR_VERS_MISMATCH";
break;
case NFS4ERR_STALE_CLIENTID: p = "NFS4ERR_STALE_CLIENTID"; break;
case NFS4ERR_STALE_STATEID: p = "NFS4ERR_STALE_STATEID"; break;
case NFS4ERR_OLD_STATEID: p = "NFS4ERR_OLD_STATEID"; break;
case NFS4ERR_BAD_STATEID: p = "NFS4ERR_BAD_STATEID"; break;
case NFS4ERR_BAD_SEQID: p = "NFS4ERR_BAD_SEQID"; break;
case NFS4ERR_NOT_SAME: p = "NFS4ERR_NOT_SAME"; break;
case NFS4ERR_LOCK_RANGE: p = "NFS4ERR_LOCK_RANGE"; break;
case NFS4ERR_SYMLINK: p = "NFS4ERR_SYMLINK"; break;
case NFS4ERR_RESTOREFH: p = "NFS4ERR_RESTOREFH"; break;
case NFS4ERR_LEASE_MOVED: p = "NFS4ERR_LEASE_MOVED"; break;
case NFS4ERR_ATTRNOTSUPP: p = "NFS4ERR_ATTRNOTSUPP"; break;
case NFS4ERR_NO_GRACE: p = "NFS4ERR_NO_GRACE"; break;
case NFS4ERR_RECLAIM_BAD: p = "NFS4ERR_RECLAIM_BAD"; break;
case NFS4ERR_RECLAIM_CONFLICT: p = "NFS4ERR_RECLAIM_CONFLICT"; break;
case NFS4ERR_BADXDR: p = "NFS4ERR_BADXDR"; break;
case NFS4ERR_LOCKS_HELD: p = "NFS4ERR_LOCKS_HELD"; break;
case NFS4ERR_OPENMODE: p = "NFS4ERR_OPENMODE"; break;
case NFS4ERR_BADOWNER: p = "NFS4ERR_BADOWNER"; break;
case NFS4ERR_BADCHAR: p = "NFS4ERR_BADCHAR"; break;
case NFS4ERR_BADNAME: p = "NFS4ERR_BADNAME"; break;
case NFS4ERR_BAD_RANGE: p = "NFS4ERR_BAD_RANGE"; break;
case NFS4ERR_LOCK_NOTSUPP: p = "NFS4ERR_LOCK_NOTSUPP"; break;
case NFS4ERR_OP_ILLEGAL: p = "NFS4ERR_OP_ILLEGAL"; break;
case NFS4ERR_DEADLOCK: p = "NFS4ERR_DEADLOCK"; break;
case NFS4ERR_FILE_OPEN: p = "NFS4ERR_FILE_OPEN"; break;
case NFS4ERR_ADMIN_REVOKED: p = "NFS4ERR_ADMIN_REVOKED"; break;
case NFS4ERR_CB_PATH_DOWN: p = "NFS4ERR_CB_PATH_DOWN"; break;
default: p = "(unknown error)"; break;
}
return (p);
}
char *
nfsstat4_to_name(int status)
{
return (status_name(status));
}
/*
* Attribute print functions. See attr_info_t.
*/
static void
{
}
static void
{
}
static void
{
char *buf;
FH4_VOL_MIGRATION | FH4_VOL_RENAME)) == 0) {
return;
}
if (val & FH4_NOEXPIRE_WITH_OPEN) {
}
if (val & FH4_VOLATILE_ANY) {
if (first)
else
}
if (val & FH4_VOL_MIGRATION) {
if (first)
else
}
if (val & FH4_VOL_RENAME) {
if (first)
else
}
}
static void
{
/* XXX print as time_t, too? */
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
static fattr4_acl val;
char buffy[NFS4_OPAQUE_LIMIT];
int i, len;
for (i = 0; i < val.fattr4_acl_len; i++) {
if (len >= NFS4_OPAQUE_LIMIT)
len);
}
}
static void
{
if (type >= ACETYPE4_NAMES_MAX) {
} else {
}
}
static void
{
char *indent = " ";
char *spacer = " ";
int pending = 0;
int bit;
/* 80 - 6 for "NFS: " = 74 */
pending = 0;
}
pending = 1;
}
}
if (pending)
}
static void
{
}
static void
{
}
static void
{
if (val & ACL4_SUPPORT_ALLOW_ACL)
if (val & ACL4_SUPPORT_DENY_ACL)
if (val & ACL4_SUPPORT_AUDIT_ACL)
if (val & ACL4_SUPPORT_ALARM_ACL)
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
detail_fh4(&val);
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
int i;
}
static void
{
static fs_locations4 val;
int i;
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
static utf8string val;
}
static void
{
}
static void
{
}
static void
{
}
static void
{
static utf8string val;
}
static void
{
static utf8string val;
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
} else
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
"Modification Time = %s (set to client time)",
"Modification Time (set to server time)");
} else
}
/*
* Display the UTF8 string that is next in the XDR stream.
*/
static void
showxdr_utf8string(char *fmt)
{
static utf8string string;
}
/*
* utf8string is defined in nfs4_prot.x as an opaque array, which means
* when it is decoded into a string, the string might not have a trailing
* null. Also, the string will still be encoded in UTF-8, rather than
* whatever character encoding is associated with the current locale. This
* routine converts a utf8string into a (null-terminated) C string. One day
* it will convert into the current character encoding, too. To avoid
* dealing with storage management issues, it allocates storage for each
* new string, then this storage is "freed" when the packet has been
* processed.
*/
#define MAX_UTF8_STRINGS 512
static char *utf_buf[MAX_UTF8_STRINGS];
static uint_t cur_utf_buf = 0;
static char *
{
if (len == 0)
return ("");
if (cur_utf_buf >= MAX_UTF8_STRINGS)
return ("[Too Many UTF-8 Strings]");
/* truncate opaques at NFS4_OPAQUE_LIMIT */
if (len > NFS4_OPAQUE_LIMIT)
}
newsize);
pr_err("out of memory\n");
utf_buflen[cur_utf_buf] = 0;
return ("");
}
}
*cp = '.';
}
}
cur_utf_buf++;
return (result);
}
static void
utf8free()
{
cur_utf_buf = 0;
}
/*
* adler16(): adler32 hash code shamelessly copied and mutiliated from
*
* The alg was originally created to provide a running
* checksum, but we don't need that -- we just want to
* chksum data described by buf,len; therefore, the first
* parameter was removed (held the running checksum),
* values (1 and 0). I also ripped out code which only
* applied to large data sets (bufs larger than 5k). All
* I wanted was their core checksum alg (which is supposed
* at all for v4 stuff -- it produced too many collisions.
*
* is included below.
*/
/* -----zlib.c copyright info below */
/*
* Copyright 2000 Sun Microsystems, Inc.
* All rights reserved.
*
* Updated from zlib-1.0.4 to zlib-1.1.3 by James Carlson.
*
* This file is derived from various .h and .c files from the zlib-1.0.4
* distribution by Jean-loup Gailly and Mark Adler, with some additions
* by Paul Mackerras to aid in implementing Deflate compression and
* decompression for PPP packets. See zlib.h for conditions of
* distribution and use.
*
* Changes that have been made include:
* - added Z_PACKET_FLUSH (see zlib.h for details)
* - added inflateIncomp and deflateOutputPending
* - allow strm->next_out to be NULL, meaning discard the output
*
* $Id: zlib.c,v 1.11 1998/09/13 23:37:12 paulus Exp $
*/
/* +++ adler32.c */
/*
* adler32.c -- compute the Adler-32 checksum of a data stream
* Copyright (C) 1995-1998 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* From: adler32.c,v 1.10 1996/05/22 11:52:18 me Exp $ */
/* -----zlib.c copyright info above */
/* -----zlib.h copyright info below */
/*
* Copyright 2000 Sun Microsystems, Inc.
* All rights reserved.
*
* Permission to use, copy, modify, and distribute this software and
* its documentation is hereby granted, provided that the above
* copyright notice appears in all copies.
*
* SUN MAKES NO REPRESENTATION OR WARRANTIES ABOUT THE SUITABILITY OF
* THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
* TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
* MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES
*
* This file has been altered from its original by Sun Microsystems to
* fit local coding style.
*/
/* -----zlib.h copyright info above */
static uint32_t
{
while (len >= 16) {
buf += 16;
len -= 16;
}
while (len > 0) {
len--;
}
}