[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>
This commit is contained in:
Al Viro 2006-11-20 17:04:10 -08:00 committed by David S. Miller
parent 30330ee00c
commit 09ef7fecea
12 changed files with 91 additions and 91 deletions

View file

@ -1031,7 +1031,7 @@ nodata:
void sctp_init_addrs(struct sctp_chunk *chunk, union sctp_addr *src,
union sctp_addr *dest)
{
memcpy(&chunk->source, src, sizeof(union sctp_addr));
memcpy(&chunk->source_h, src, sizeof(union sctp_addr));
memcpy(&chunk->dest, dest, sizeof(union sctp_addr));
}
@ -1040,10 +1040,10 @@ const union sctp_addr *sctp_source(const struct sctp_chunk *chunk)
{
/* If we have a known transport, use that. */
if (chunk->transport) {
return &chunk->transport->ipaddr;
return &chunk->transport->ipaddr_h;
} else {
/* Otherwise, extract it from the IP header. */
return &chunk->source;
return &chunk->source_h;
}
}
@ -2594,7 +2594,7 @@ static int sctp_asconf_param_success(struct sctp_association *asoc,
sctp_write_lock(&asoc->base.addr_lock);
list_for_each(pos, &bp->address_list) {
saddr = list_entry(pos, struct sctp_sockaddr_entry, list);
if (sctp_cmp_addr_exact(&saddr->a, &addr))
if (sctp_cmp_addr_exact(&saddr->a_h, &addr))
saddr->use_as_src = 1;
}
sctp_write_unlock(&asoc->base.addr_lock);