diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-11-20 20:04:10 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:26:29 -0500 |
commit | 09ef7fecea40c5e4c0dfe35bed3f0ed8da554cf5 (patch) | |
tree | b293f6aa012265dcb413d7dd6c0b68b1f2676b9f /net/sctp/transport.c | |
parent | 30330ee00ce077de9d459c17125573ff618bd7a9 (diff) |
[SCTP]: Beginning of conversion to net-endian for embedded sctp_addr.
Part 1: rename sctp_chunk->source, sctp_sockaddr_entry->a,
sctp_transport->ipaddr and sctp_transport->saddr (to ..._h)
The next patch will reintroduce these fields and keep them as
net-endian mirrors of the original (renamed) ones. Split in
two patches to make sure that we hadn't forgotten any instanes.
Later in the series we'll eliminate uses of host-endian variants
(basically switching users to net-endian counterparts as we
progress through that mess). Then host-endian ones will die.
Other embedded host-endian sctp_addr will be easier to switch
directly, so we leave them alone for now.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/transport.c')
-rw-r--r-- | net/sctp/transport.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/sctp/transport.c b/net/sctp/transport.c index 3e5936a5f671..1f56c9d95739 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c | |||
@@ -61,12 +61,12 @@ static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer, | |||
61 | gfp_t gfp) | 61 | gfp_t gfp) |
62 | { | 62 | { |
63 | /* Copy in the address. */ | 63 | /* Copy in the address. */ |
64 | peer->ipaddr = *addr; | 64 | peer->ipaddr_h = *addr; |
65 | peer->af_specific = sctp_get_af_specific(addr->sa.sa_family); | 65 | peer->af_specific = sctp_get_af_specific(addr->sa.sa_family); |
66 | peer->asoc = NULL; | 66 | peer->asoc = NULL; |
67 | 67 | ||
68 | peer->dst = NULL; | 68 | peer->dst = NULL; |
69 | memset(&peer->saddr, 0, sizeof(union sctp_addr)); | 69 | memset(&peer->saddr_h, 0, sizeof(union sctp_addr)); |
70 | 70 | ||
71 | /* From 6.3.1 RTO Calculation: | 71 | /* From 6.3.1 RTO Calculation: |
72 | * | 72 | * |
@@ -232,7 +232,7 @@ void sctp_transport_pmtu(struct sctp_transport *transport) | |||
232 | { | 232 | { |
233 | struct dst_entry *dst; | 233 | struct dst_entry *dst; |
234 | 234 | ||
235 | dst = transport->af_specific->get_dst(NULL, &transport->ipaddr, NULL); | 235 | dst = transport->af_specific->get_dst(NULL, &transport->ipaddr_h, NULL); |
236 | 236 | ||
237 | if (dst) { | 237 | if (dst) { |
238 | transport->pathmtu = dst_mtu(dst); | 238 | transport->pathmtu = dst_mtu(dst); |
@@ -249,15 +249,15 @@ void sctp_transport_route(struct sctp_transport *transport, | |||
249 | { | 249 | { |
250 | struct sctp_association *asoc = transport->asoc; | 250 | struct sctp_association *asoc = transport->asoc; |
251 | struct sctp_af *af = transport->af_specific; | 251 | struct sctp_af *af = transport->af_specific; |
252 | union sctp_addr *daddr = &transport->ipaddr; | 252 | union sctp_addr *daddr = &transport->ipaddr_h; |
253 | struct dst_entry *dst; | 253 | struct dst_entry *dst; |
254 | 254 | ||
255 | dst = af->get_dst(asoc, daddr, saddr); | 255 | dst = af->get_dst(asoc, daddr, saddr); |
256 | 256 | ||
257 | if (saddr) | 257 | if (saddr) |
258 | memcpy(&transport->saddr, saddr, sizeof(union sctp_addr)); | 258 | memcpy(&transport->saddr_h, saddr, sizeof(union sctp_addr)); |
259 | else | 259 | else |
260 | af->get_saddr(asoc, dst, daddr, &transport->saddr); | 260 | af->get_saddr(asoc, dst, daddr, &transport->saddr_h); |
261 | 261 | ||
262 | transport->dst = dst; | 262 | transport->dst = dst; |
263 | if ((transport->param_flags & SPP_PMTUD_DISABLE) && transport->pathmtu) { | 263 | if ((transport->param_flags & SPP_PMTUD_DISABLE) && transport->pathmtu) { |
@@ -270,7 +270,7 @@ void sctp_transport_route(struct sctp_transport *transport, | |||
270 | * association's active path for getsockname(). | 270 | * association's active path for getsockname(). |
271 | */ | 271 | */ |
272 | if (asoc && (transport == asoc->peer.active_path)) | 272 | if (asoc && (transport == asoc->peer.active_path)) |
273 | opt->pf->af->to_sk_saddr(&transport->saddr, | 273 | opt->pf->af->to_sk_saddr(&transport->saddr_h, |
274 | asoc->base.sk); | 274 | asoc->base.sk); |
275 | } else | 275 | } else |
276 | transport->pathmtu = SCTP_DEFAULT_MAXSEGMENT; | 276 | transport->pathmtu = SCTP_DEFAULT_MAXSEGMENT; |