Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 69188
b: refs/heads/master
c: fbfe3cc
h: refs/heads/master
v: v3
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Oct 9, 2007
1 parent eb1ef0b commit 7c4c38e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0c43b3d81cca46ab2469f8802f8bd68b49f1b2a5
refs/heads/master: fbfe3cc677c1a62ca6472abf24d03d4bf9f03a55
2 changes: 2 additions & 0 deletions trunk/include/linux/sunrpc/xprt.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ enum rpc_display_format_t {
RPC_DISPLAY_PORT,
RPC_DISPLAY_PROTO,
RPC_DISPLAY_ALL,
RPC_DISPLAY_HEX_ADDR,
RPC_DISPLAY_HEX_PORT,
RPC_DISPLAY_MAX,
};

Expand Down
14 changes: 14 additions & 0 deletions trunk/net/sunrpc/xprtsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,20 @@ static void xs_format_peer_addresses(struct rpc_xprt *xprt)
xprt->prot == IPPROTO_UDP ? "udp" : "tcp");
}
xprt->address_strings[RPC_DISPLAY_ALL] = buf;

buf = kzalloc(10, GFP_KERNEL);
if (buf) {
snprintf(buf, 10, "%02x%02x%02x%02x",
NIPQUAD(addr->sin_addr.s_addr));
}
xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = buf;

buf = kzalloc(8, GFP_KERNEL);
if (buf) {
snprintf(buf, 8, "%4hx",
ntohs(addr->sin_port));
}
xprt->address_strings[RPC_DISPLAY_HEX_PORT] = buf;
}

static void xs_free_peer_addresses(struct rpc_xprt *xprt)
Expand Down

0 comments on commit 7c4c38e

Please sign in to comment.