diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-11-20 20:01:42 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:26:23 -0500 |
commit | dbc16db1e58da6c346ca3e63870c17b93fbed0f0 (patch) | |
tree | bfa4a31af842760a94ce9b29d575473d9db43c34 /net/sctp | |
parent | 72f17e1c0984fbdb60abf245d81b947393910100 (diff) |
[SCTP]: Trivial sctp endianness annotations.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/associola.c | 2 | ||||
-rw-r--r-- | net/sctp/ipv6.c | 4 | ||||
-rw-r--r-- | net/sctp/protocol.c | 2 | ||||
-rw-r--r-- | net/sctp/sm_make_chunk.c | 18 |
4 files changed, 13 insertions, 13 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index ed0445fe85e7..a5d7abba89e4 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c | |||
@@ -868,7 +868,7 @@ struct sctp_transport *sctp_assoc_lookup_tsn(struct sctp_association *asoc, | |||
868 | struct list_head *entry, *pos; | 868 | struct list_head *entry, *pos; |
869 | struct sctp_transport *transport; | 869 | struct sctp_transport *transport; |
870 | struct sctp_chunk *chunk; | 870 | struct sctp_chunk *chunk; |
871 | __u32 key = htonl(tsn); | 871 | __be32 key = htonl(tsn); |
872 | 872 | ||
873 | match = NULL; | 873 | match = NULL; |
874 | 874 | ||
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index 3c316c688ade..1f9f5ec07595 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c | |||
@@ -239,7 +239,7 @@ static inline int sctp_v6_addr_match_len(union sctp_addr *s1, | |||
239 | int i, j; | 239 | int i, j; |
240 | 240 | ||
241 | for (i = 0; i < 4 ; i++) { | 241 | for (i = 0; i < 4 ; i++) { |
242 | __u32 a1xora2; | 242 | __be32 a1xora2; |
243 | 243 | ||
244 | a1xora2 = a1->s6_addr32[i] ^ a2->s6_addr32[i]; | 244 | a1xora2 = a1->s6_addr32[i] ^ a2->s6_addr32[i]; |
245 | 245 | ||
@@ -425,7 +425,7 @@ static int sctp_v6_to_addr_param(const union sctp_addr *addr, | |||
425 | int length = sizeof(sctp_ipv6addr_param_t); | 425 | int length = sizeof(sctp_ipv6addr_param_t); |
426 | 426 | ||
427 | param->v6.param_hdr.type = SCTP_PARAM_IPV6_ADDRESS; | 427 | param->v6.param_hdr.type = SCTP_PARAM_IPV6_ADDRESS; |
428 | param->v6.param_hdr.length = ntohs(length); | 428 | param->v6.param_hdr.length = htons(length); |
429 | ipv6_addr_copy(¶m->v6.addr, &addr->v6.sin6_addr); | 429 | ipv6_addr_copy(¶m->v6.addr, &addr->v6.sin6_addr); |
430 | 430 | ||
431 | return length; | 431 | return length; |
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index c107d45f6e65..4310e7fac443 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -307,7 +307,7 @@ static int sctp_v4_to_addr_param(const union sctp_addr *addr, | |||
307 | int length = sizeof(sctp_ipv4addr_param_t); | 307 | int length = sizeof(sctp_ipv4addr_param_t); |
308 | 308 | ||
309 | param->v4.param_hdr.type = SCTP_PARAM_IPV4_ADDRESS; | 309 | param->v4.param_hdr.type = SCTP_PARAM_IPV4_ADDRESS; |
310 | param->v4.param_hdr.length = ntohs(length); | 310 | param->v4.param_hdr.length = htons(length); |
311 | param->v4.addr.s_addr = addr->v4.sin_addr.s_addr; | 311 | param->v4.addr.s_addr = addr->v4.sin_addr.s_addr; |
312 | 312 | ||
313 | return length; | 313 | return length; |
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index a3bde93bd8a3..ccbba6b24d1d 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -1190,7 +1190,7 @@ void sctp_chunk_assign_ssn(struct sctp_chunk *chunk) | |||
1190 | if (chunk->chunk_hdr->flags & SCTP_DATA_UNORDERED) { | 1190 | if (chunk->chunk_hdr->flags & SCTP_DATA_UNORDERED) { |
1191 | ssn = 0; | 1191 | ssn = 0; |
1192 | } else { | 1192 | } else { |
1193 | sid = htons(chunk->subh.data_hdr->stream); | 1193 | sid = ntohs(chunk->subh.data_hdr->stream); |
1194 | if (chunk->chunk_hdr->flags & SCTP_DATA_LAST_FRAG) | 1194 | if (chunk->chunk_hdr->flags & SCTP_DATA_LAST_FRAG) |
1195 | ssn = sctp_ssn_next(&chunk->asoc->ssnmap->out, sid); | 1195 | ssn = sctp_ssn_next(&chunk->asoc->ssnmap->out, sid); |
1196 | else | 1196 | else |
@@ -2230,7 +2230,7 @@ struct sctp_chunk *sctp_make_asconf_update_ip(struct sctp_association *asoc, | |||
2230 | union sctp_addr *laddr, | 2230 | union sctp_addr *laddr, |
2231 | struct sockaddr *addrs, | 2231 | struct sockaddr *addrs, |
2232 | int addrcnt, | 2232 | int addrcnt, |
2233 | __u16 flags) | 2233 | __be16 flags) |
2234 | { | 2234 | { |
2235 | sctp_addip_param_t param; | 2235 | sctp_addip_param_t param; |
2236 | struct sctp_chunk *retval; | 2236 | struct sctp_chunk *retval; |
@@ -2364,13 +2364,13 @@ static struct sctp_chunk *sctp_make_asconf_ack(const struct sctp_association *as | |||
2364 | 2364 | ||
2365 | /* Add response parameters to an ASCONF_ACK chunk. */ | 2365 | /* Add response parameters to an ASCONF_ACK chunk. */ |
2366 | static void sctp_add_asconf_response(struct sctp_chunk *chunk, __u32 crr_id, | 2366 | static void sctp_add_asconf_response(struct sctp_chunk *chunk, __u32 crr_id, |
2367 | __u16 err_code, sctp_addip_param_t *asconf_param) | 2367 | __be16 err_code, sctp_addip_param_t *asconf_param) |
2368 | { | 2368 | { |
2369 | sctp_addip_param_t ack_param; | 2369 | sctp_addip_param_t ack_param; |
2370 | sctp_errhdr_t err_param; | 2370 | sctp_errhdr_t err_param; |
2371 | int asconf_param_len = 0; | 2371 | int asconf_param_len = 0; |
2372 | int err_param_len = 0; | 2372 | int err_param_len = 0; |
2373 | __u16 response_type; | 2373 | __be16 response_type; |
2374 | 2374 | ||
2375 | if (SCTP_ERROR_NO_ERROR == err_code) { | 2375 | if (SCTP_ERROR_NO_ERROR == err_code) { |
2376 | response_type = SCTP_PARAM_SUCCESS_REPORT; | 2376 | response_type = SCTP_PARAM_SUCCESS_REPORT; |
@@ -2404,7 +2404,7 @@ static void sctp_add_asconf_response(struct sctp_chunk *chunk, __u32 crr_id, | |||
2404 | } | 2404 | } |
2405 | 2405 | ||
2406 | /* Process a asconf parameter. */ | 2406 | /* Process a asconf parameter. */ |
2407 | static __u16 sctp_process_asconf_param(struct sctp_association *asoc, | 2407 | static __be16 sctp_process_asconf_param(struct sctp_association *asoc, |
2408 | struct sctp_chunk *asconf, | 2408 | struct sctp_chunk *asconf, |
2409 | sctp_addip_param_t *asconf_param) | 2409 | sctp_addip_param_t *asconf_param) |
2410 | { | 2410 | { |
@@ -2487,7 +2487,7 @@ struct sctp_chunk *sctp_process_asconf(struct sctp_association *asoc, | |||
2487 | sctp_addip_param_t *asconf_param; | 2487 | sctp_addip_param_t *asconf_param; |
2488 | struct sctp_chunk *asconf_ack; | 2488 | struct sctp_chunk *asconf_ack; |
2489 | 2489 | ||
2490 | __u16 err_code; | 2490 | __be16 err_code; |
2491 | int length = 0; | 2491 | int length = 0; |
2492 | int chunk_len = asconf->skb->len; | 2492 | int chunk_len = asconf->skb->len; |
2493 | __u32 serial; | 2493 | __u32 serial; |
@@ -2630,7 +2630,7 @@ static int sctp_asconf_param_success(struct sctp_association *asoc, | |||
2630 | * All TLVs after the failed response are considered unsuccessful unless a | 2630 | * All TLVs after the failed response are considered unsuccessful unless a |
2631 | * specific success indication is present for the parameter. | 2631 | * specific success indication is present for the parameter. |
2632 | */ | 2632 | */ |
2633 | static __u16 sctp_get_asconf_response(struct sctp_chunk *asconf_ack, | 2633 | static __be16 sctp_get_asconf_response(struct sctp_chunk *asconf_ack, |
2634 | sctp_addip_param_t *asconf_param, | 2634 | sctp_addip_param_t *asconf_param, |
2635 | int no_err) | 2635 | int no_err) |
2636 | { | 2636 | { |
@@ -2638,7 +2638,7 @@ static __u16 sctp_get_asconf_response(struct sctp_chunk *asconf_ack, | |||
2638 | sctp_errhdr_t *err_param; | 2638 | sctp_errhdr_t *err_param; |
2639 | int length; | 2639 | int length; |
2640 | int asconf_ack_len = asconf_ack->skb->len; | 2640 | int asconf_ack_len = asconf_ack->skb->len; |
2641 | __u16 err_code; | 2641 | __be16 err_code; |
2642 | 2642 | ||
2643 | if (no_err) | 2643 | if (no_err) |
2644 | err_code = SCTP_ERROR_NO_ERROR; | 2644 | err_code = SCTP_ERROR_NO_ERROR; |
@@ -2694,7 +2694,7 @@ int sctp_process_asconf_ack(struct sctp_association *asoc, | |||
2694 | int all_param_pass = 0; | 2694 | int all_param_pass = 0; |
2695 | int no_err = 1; | 2695 | int no_err = 1; |
2696 | int retval = 0; | 2696 | int retval = 0; |
2697 | __u16 err_code = SCTP_ERROR_NO_ERROR; | 2697 | __be16 err_code = SCTP_ERROR_NO_ERROR; |
2698 | 2698 | ||
2699 | /* Skip the chunkhdr and addiphdr from the last asconf sent and store | 2699 | /* Skip the chunkhdr and addiphdr from the last asconf sent and store |
2700 | * a pointer to address parameter. | 2700 | * a pointer to address parameter. |