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/sm_make_chunk.c | |
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/sm_make_chunk.c')
-rw-r--r-- | net/sctp/sm_make_chunk.c | 18 |
1 files changed, 9 insertions, 9 deletions
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. |