Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 69201
b: refs/heads/master
c: 756805e
h: refs/heads/master
i:
  69199: e3e4458
v: v3
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Oct 9, 2007
1 parent d97e4ae commit 03fac03
Show file tree
Hide file tree
Showing 3 changed files with 20 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: 8945ee5e27156ef9708bc3a11da87ba689aa38b6
refs/heads/master: 756805e7a76bcd2aae07fe31786fe453375e60b1
1 change: 1 addition & 0 deletions trunk/include/linux/sunrpc/xprt.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ enum rpc_display_format_t {
RPC_DISPLAY_ALL,
RPC_DISPLAY_HEX_ADDR,
RPC_DISPLAY_HEX_PORT,
RPC_DISPLAY_UNIVERSAL_ADDR,
RPC_DISPLAY_MAX,
};

Expand Down
18 changes: 18 additions & 0 deletions trunk/net/sunrpc/xprtsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,15 @@ static void xs_format_ipv4_peer_addresses(struct rpc_xprt *xprt)
ntohs(addr->sin_port));
}
xprt->address_strings[RPC_DISPLAY_HEX_PORT] = buf;

buf = kzalloc(30, GFP_KERNEL);
if (buf) {
snprintf(buf, 30, NIPQUAD_FMT".%u.%u",
NIPQUAD(addr->sin_addr.s_addr),
ntohs(addr->sin_port) >> 8,
ntohs(addr->sin_port) & 0xff);
}
xprt->address_strings[RPC_DISPLAY_UNIVERSAL_ADDR] = buf;
}

static void xs_format_ipv6_peer_addresses(struct rpc_xprt *xprt)
Expand Down Expand Up @@ -380,6 +389,15 @@ static void xs_format_ipv6_peer_addresses(struct rpc_xprt *xprt)
ntohs(addr->sin6_port));
}
xprt->address_strings[RPC_DISPLAY_HEX_PORT] = buf;

buf = kzalloc(50, GFP_KERNEL);
if (buf) {
snprintf(buf, 50, NIP6_FMT".%u.%u",
NIP6(addr->sin6_addr),
ntohs(addr->sin6_port) >> 8,
ntohs(addr->sin6_port) & 0xff);
}
xprt->address_strings[RPC_DISPLAY_UNIVERSAL_ADDR] = buf;
}

static void xs_free_peer_addresses(struct rpc_xprt *xprt)
Expand Down

0 comments on commit 03fac03

Please sign in to comment.