void
nfsreply_print(netdissect_options *ndo,
- register const u_char *bp, u_int length,
- register const u_char *bp2)
+ const u_char *bp, u_int length,
+ const u_char *bp2)
{
- register const struct sunrpc_msg *rp;
+ const struct sunrpc_msg *rp;
char srcid[20], dstid[20]; /*fits 32bit*/
nfserr = 0; /* assume no error */
void
nfsreply_noaddr_print(netdissect_options *ndo,
- register const u_char *bp, u_int length,
- register const u_char *bp2)
+ const u_char *bp, u_int length,
+ const u_char *bp2)
{
- register const struct sunrpc_msg *rp;
+ const struct sunrpc_msg *rp;
uint32_t proc, vers, reply_stat;
enum sunrpc_reject_stat rstat;
uint32_t rlow;
*/
static const uint32_t *
parsereq(netdissect_options *ndo,
- register const struct sunrpc_msg *rp, register u_int length)
+ const struct sunrpc_msg *rp, u_int length)
{
- register const uint32_t *dp;
- register u_int len;
+ const uint32_t *dp;
+ u_int len;
/*
* find the start of the req data (if we captured it)
*/
static const uint32_t *
parsefh(netdissect_options *ndo,
- register const uint32_t *dp, int v3)
+ const uint32_t *dp, int v3)
{
u_int len;
*/
static const uint32_t *
parsefn(netdissect_options *ndo,
- register const uint32_t *dp)
+ const uint32_t *dp)
{
- register uint32_t len;
- register const u_char *cp;
+ uint32_t len;
+ const u_char *cp;
/* Bail if we don't have the string length */
ND_TCHECK(*dp);
- /* Fetch string length; convert to host order */
- len = *dp++;
- NTOHL(len);
+ /* Fetch big-endian string length */
+ len = EXTRACT_BE_U_4(dp);
+ dp++;
ND_TCHECK_LEN(dp, ((len + 3) & ~3));
*/
static const uint32_t *
parsefhn(netdissect_options *ndo,
- register const uint32_t *dp, int v3)
+ const uint32_t *dp, int v3)
{
dp = parsefh(ndo, dp, v3);
if (dp == NULL)
void
nfsreq_noaddr_print(netdissect_options *ndo,
- register const u_char *bp, u_int length,
- register const u_char *bp2)
+ const u_char *bp, u_int length,
+ const u_char *bp2)
{
- register const struct sunrpc_msg *rp;
- register const uint32_t *dp;
+ const struct sunrpc_msg *rp;
+ const uint32_t *dp;
nfs_type type;
int v3;
uint32_t proc;
EXTRACT_BE_U_4(dp + 4),
EXTRACT_BE_U_8(dp)));
if (ndo->ndo_vflag)
- ND_PRINT((ndo, " verf %08x%08x", dp[2], dp[3]));
+ ND_PRINT((ndo, " verf %08x%08x",
+ EXTRACT_BE_U_4(dp + 2),
+ EXTRACT_BE_U_4(dp + 3)));
} else {
ND_TCHECK(dp[1]);
/*
if (ndo->ndo_vflag) {
ND_TCHECK(dp[5]);
ND_PRINT((ndo, " max %u verf %08x%08x",
- EXTRACT_BE_U_4(dp + 5), dp[2], dp[3]));
+ EXTRACT_BE_U_4(dp + 5),
+ EXTRACT_BE_U_4(dp + 2),
+ EXTRACT_BE_U_4(dp + 3)));
}
return;
}
*/
static void
nfs_printfh(netdissect_options *ndo,
- register const uint32_t *dp, const u_int len)
+ const uint32_t *dp, const u_int len)
{
my_fsid fsid;
uint32_t ino;
ND_PRINT((ndo, " fh["));
for (i=0; i<len; i++) {
- ND_PRINT((ndo, "%s%x", sep, dp[i]));
+ ND_PRINT((ndo, "%s%x", sep, EXTRACT_BE_U_4(dp + i)));
sep = ":";
}
ND_PRINT((ndo, "]"));
*/
static const uint32_t *
parserep(netdissect_options *ndo,
- register const struct sunrpc_msg *rp, register u_int length)
+ const struct sunrpc_msg *rp, u_int length)
{
- register const uint32_t *dp;
+ const uint32_t *dp;
u_int len;
enum sunrpc_accept_stat astat;
ND_TCHECK(dp[2]);
ND_PRINT((ndo, " offset 0x%x size %d ",
EXTRACT_BE_U_4(dp), EXTRACT_BE_U_4(dp + 1)));
- if (dp[2] != 0)
+ if (EXTRACT_BE_U_4(dp + 2) != 0)
ND_PRINT((ndo, " eof"));
return (1);
return dp;
if (ndo->ndo_vflag) {
ND_TCHECK(dp[1]);
- ND_PRINT((ndo, " verf %08x%08x", dp[0], dp[1]));
+ ND_PRINT((ndo, " verf %08x%08x",
+ EXTRACT_BE_U_4(dp), EXTRACT_BE_U_4(dp + 1)));
dp += 2;
}
return dp;
interp_reply(netdissect_options *ndo,
const struct sunrpc_msg *rp, uint32_t proc, uint32_t vers, int length)
{
- register const uint32_t *dp;
- register int v3;
+ const uint32_t *dp;
+ int v3;
int er;
v3 = (vers == NFS_VER3);