summaryrefslogtreecommitdiffstats
path: root/include/linux/sctp.h
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2017-06-29 23:52:13 -0400
committerDavid S. Miller <davem@davemloft.net>2017-07-01 12:08:41 -0400
commit922dbc5be2186659d2c453a53f2ae569e55b6101 (patch)
tree5d86f92e1e86d0e3da98255617ecafc3db969d89 /include/linux/sctp.h
parentae146d9b76589d636d11c5e4382bbba2fe8bdb9b (diff)
sctp: remove the typedef sctp_chunkhdr_t
This patch is to remove the typedef sctp_chunkhdr_t, and replace with struct sctp_chunkhdr in the places where it's using this typedef. It is also to fix some indents and use sizeof(variable) instead of sizeof(type)., especially in sctp_new. Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/sctp.h')
-rw-r--r--include/linux/sctp.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/include/linux/sctp.h b/include/linux/sctp.h
index 85540ec4b561..9ad5b9e8df78 100644
--- a/include/linux/sctp.h
+++ b/include/linux/sctp.h
@@ -70,11 +70,11 @@ static inline struct sctphdr *sctp_hdr(const struct sk_buff *skb)
70} 70}
71 71
72/* Section 3.2. Chunk Field Descriptions. */ 72/* Section 3.2. Chunk Field Descriptions. */
73typedef struct sctp_chunkhdr { 73struct sctp_chunkhdr {
74 __u8 type; 74 __u8 type;
75 __u8 flags; 75 __u8 flags;
76 __be16 length; 76 __be16 length;
77} sctp_chunkhdr_t; 77};
78 78
79 79
80/* Section 3.2. Chunk Type Values. 80/* Section 3.2. Chunk Type Values.
@@ -236,8 +236,8 @@ typedef struct sctp_datahdr {
236} sctp_datahdr_t; 236} sctp_datahdr_t;
237 237
238typedef struct sctp_data_chunk { 238typedef struct sctp_data_chunk {
239 sctp_chunkhdr_t chunk_hdr; 239 struct sctp_chunkhdr chunk_hdr;
240 sctp_datahdr_t data_hdr; 240 sctp_datahdr_t data_hdr;
241} sctp_data_chunk_t; 241} sctp_data_chunk_t;
242 242
243/* DATA Chuck Specific Flags */ 243/* DATA Chuck Specific Flags */
@@ -267,7 +267,7 @@ typedef struct sctp_inithdr {
267} sctp_inithdr_t; 267} sctp_inithdr_t;
268 268
269typedef struct sctp_init_chunk { 269typedef struct sctp_init_chunk {
270 sctp_chunkhdr_t chunk_hdr; 270 struct sctp_chunkhdr chunk_hdr;
271 sctp_inithdr_t init_hdr; 271 sctp_inithdr_t init_hdr;
272} sctp_init_chunk_t; 272} sctp_init_chunk_t;
273 273
@@ -386,7 +386,7 @@ typedef struct sctp_sackhdr {
386} sctp_sackhdr_t; 386} sctp_sackhdr_t;
387 387
388typedef struct sctp_sack_chunk { 388typedef struct sctp_sack_chunk {
389 sctp_chunkhdr_t chunk_hdr; 389 struct sctp_chunkhdr chunk_hdr;
390 sctp_sackhdr_t sack_hdr; 390 sctp_sackhdr_t sack_hdr;
391} sctp_sack_chunk_t; 391} sctp_sack_chunk_t;
392 392
@@ -403,7 +403,7 @@ typedef struct sctp_heartbeathdr {
403} sctp_heartbeathdr_t; 403} sctp_heartbeathdr_t;
404 404
405typedef struct sctp_heartbeat_chunk { 405typedef struct sctp_heartbeat_chunk {
406 sctp_chunkhdr_t chunk_hdr; 406 struct sctp_chunkhdr chunk_hdr;
407 sctp_heartbeathdr_t hb_hdr; 407 sctp_heartbeathdr_t hb_hdr;
408} sctp_heartbeat_chunk_t; 408} sctp_heartbeat_chunk_t;
409 409
@@ -413,7 +413,7 @@ typedef struct sctp_heartbeat_chunk {
413 * chunk descriptor. 413 * chunk descriptor.
414 */ 414 */
415typedef struct sctp_abort_chunk { 415typedef struct sctp_abort_chunk {
416 sctp_chunkhdr_t uh; 416 struct sctp_chunkhdr uh;
417} sctp_abort_chunk_t; 417} sctp_abort_chunk_t;
418 418
419 419
@@ -425,8 +425,8 @@ typedef struct sctp_shutdownhdr {
425} sctp_shutdownhdr_t; 425} sctp_shutdownhdr_t;
426 426
427struct sctp_shutdown_chunk_t { 427struct sctp_shutdown_chunk_t {
428 sctp_chunkhdr_t chunk_hdr; 428 struct sctp_chunkhdr chunk_hdr;
429 sctp_shutdownhdr_t shutdown_hdr; 429 sctp_shutdownhdr_t shutdown_hdr;
430}; 430};
431 431
432/* RFC 2960. Section 3.3.10 Operation Error (ERROR) (9) */ 432/* RFC 2960. Section 3.3.10 Operation Error (ERROR) (9) */
@@ -438,8 +438,8 @@ typedef struct sctp_errhdr {
438} sctp_errhdr_t; 438} sctp_errhdr_t;
439 439
440typedef struct sctp_operr_chunk { 440typedef struct sctp_operr_chunk {
441 sctp_chunkhdr_t chunk_hdr; 441 struct sctp_chunkhdr chunk_hdr;
442 sctp_errhdr_t err_hdr; 442 sctp_errhdr_t err_hdr;
443} sctp_operr_chunk_t; 443} sctp_operr_chunk_t;
444 444
445/* RFC 2960 3.3.10 - Operation Error 445/* RFC 2960 3.3.10 - Operation Error
@@ -528,7 +528,7 @@ typedef struct sctp_ecnehdr {
528} sctp_ecnehdr_t; 528} sctp_ecnehdr_t;
529 529
530typedef struct sctp_ecne_chunk { 530typedef struct sctp_ecne_chunk {
531 sctp_chunkhdr_t chunk_hdr; 531 struct sctp_chunkhdr chunk_hdr;
532 sctp_ecnehdr_t ence_hdr; 532 sctp_ecnehdr_t ence_hdr;
533} sctp_ecne_chunk_t; 533} sctp_ecne_chunk_t;
534 534
@@ -540,7 +540,7 @@ typedef struct sctp_cwrhdr {
540} sctp_cwrhdr_t; 540} sctp_cwrhdr_t;
541 541
542typedef struct sctp_cwr_chunk { 542typedef struct sctp_cwr_chunk {
543 sctp_chunkhdr_t chunk_hdr; 543 struct sctp_chunkhdr chunk_hdr;
544 sctp_cwrhdr_t cwr_hdr; 544 sctp_cwrhdr_t cwr_hdr;
545} sctp_cwr_chunk_t; 545} sctp_cwr_chunk_t;
546 546
@@ -649,7 +649,7 @@ typedef struct sctp_addiphdr {
649} sctp_addiphdr_t; 649} sctp_addiphdr_t;
650 650
651typedef struct sctp_addip_chunk { 651typedef struct sctp_addip_chunk {
652 sctp_chunkhdr_t chunk_hdr; 652 struct sctp_chunkhdr chunk_hdr;
653 sctp_addiphdr_t addip_hdr; 653 sctp_addiphdr_t addip_hdr;
654} sctp_addip_chunk_t; 654} sctp_addip_chunk_t;
655 655
@@ -709,7 +709,7 @@ typedef struct sctp_authhdr {
709} sctp_authhdr_t; 709} sctp_authhdr_t;
710 710
711typedef struct sctp_auth_chunk { 711typedef struct sctp_auth_chunk {
712 sctp_chunkhdr_t chunk_hdr; 712 struct sctp_chunkhdr chunk_hdr;
713 sctp_authhdr_t auth_hdr; 713 sctp_authhdr_t auth_hdr;
714} sctp_auth_chunk_t; 714} sctp_auth_chunk_t;
715 715
@@ -719,7 +719,7 @@ struct sctp_infox {
719}; 719};
720 720
721struct sctp_reconf_chunk { 721struct sctp_reconf_chunk {
722 sctp_chunkhdr_t chunk_hdr; 722 struct sctp_chunkhdr chunk_hdr;
723 __u8 params[0]; 723 __u8 params[0];
724}; 724};
725 725