summaryrefslogtreecommitdiffstats
path: root/include/linux/sctp.h
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2017-06-29 23:52:16 -0400
committerDavid S. Miller <davem@davemloft.net>2017-07-01 12:08:41 -0400
commit3c9187049214127d3401926b033d05eb75d69c39 (patch)
tree0869a6eefe765652924cb68015be31b4812d40fe /include/linux/sctp.h
parentec431c2cd55c4122e729b7dc45956653a038614b (diff)
sctp: remove the typedef sctp_paramhdr_t
This patch is to remove the typedef sctp_paramhdr_t, and replace with struct sctp_paramhdr in the places where it's using this typedef. It is also to fix some indents and use sizeof(variable) instead of sizeof(type). 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.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/include/linux/sctp.h b/include/linux/sctp.h
index ffdccb4da7e5..142bb6aa88eb 100644
--- a/include/linux/sctp.h
+++ b/include/linux/sctp.h
@@ -162,10 +162,10 @@ enum { SCTP_CHUNK_FLAG_T = 0x01 };
162 * Section 3.2.1 Optional/Variable-length Parmaeter Format. 162 * Section 3.2.1 Optional/Variable-length Parmaeter Format.
163 */ 163 */
164 164
165typedef struct sctp_paramhdr { 165struct sctp_paramhdr {
166 __be16 type; 166 __be16 type;
167 __be16 length; 167 __be16 length;
168} sctp_paramhdr_t; 168};
169 169
170typedef enum { 170typedef enum {
171 171
@@ -274,37 +274,37 @@ typedef struct sctp_init_chunk {
274 274
275/* Section 3.3.2.1. IPv4 Address Parameter (5) */ 275/* Section 3.3.2.1. IPv4 Address Parameter (5) */
276typedef struct sctp_ipv4addr_param { 276typedef struct sctp_ipv4addr_param {
277 sctp_paramhdr_t param_hdr; 277 struct sctp_paramhdr param_hdr;
278 struct in_addr addr; 278 struct in_addr addr;
279} sctp_ipv4addr_param_t; 279} sctp_ipv4addr_param_t;
280 280
281/* Section 3.3.2.1. IPv6 Address Parameter (6) */ 281/* Section 3.3.2.1. IPv6 Address Parameter (6) */
282typedef struct sctp_ipv6addr_param { 282typedef struct sctp_ipv6addr_param {
283 sctp_paramhdr_t param_hdr; 283 struct sctp_paramhdr param_hdr;
284 struct in6_addr addr; 284 struct in6_addr addr;
285} sctp_ipv6addr_param_t; 285} sctp_ipv6addr_param_t;
286 286
287/* Section 3.3.2.1 Cookie Preservative (9) */ 287/* Section 3.3.2.1 Cookie Preservative (9) */
288typedef struct sctp_cookie_preserve_param { 288typedef struct sctp_cookie_preserve_param {
289 sctp_paramhdr_t param_hdr; 289 struct sctp_paramhdr param_hdr;
290 __be32 lifespan_increment; 290 __be32 lifespan_increment;
291} sctp_cookie_preserve_param_t; 291} sctp_cookie_preserve_param_t;
292 292
293/* Section 3.3.2.1 Host Name Address (11) */ 293/* Section 3.3.2.1 Host Name Address (11) */
294typedef struct sctp_hostname_param { 294typedef struct sctp_hostname_param {
295 sctp_paramhdr_t param_hdr; 295 struct sctp_paramhdr param_hdr;
296 uint8_t hostname[0]; 296 uint8_t hostname[0];
297} sctp_hostname_param_t; 297} sctp_hostname_param_t;
298 298
299/* Section 3.3.2.1 Supported Address Types (12) */ 299/* Section 3.3.2.1 Supported Address Types (12) */
300typedef struct sctp_supported_addrs_param { 300typedef struct sctp_supported_addrs_param {
301 sctp_paramhdr_t param_hdr; 301 struct sctp_paramhdr param_hdr;
302 __be16 types[0]; 302 __be16 types[0];
303} sctp_supported_addrs_param_t; 303} sctp_supported_addrs_param_t;
304 304
305/* Appendix A. ECN Capable (32768) */ 305/* Appendix A. ECN Capable (32768) */
306typedef struct sctp_ecn_capable_param { 306typedef struct sctp_ecn_capable_param {
307 sctp_paramhdr_t param_hdr; 307 struct sctp_paramhdr param_hdr;
308} sctp_ecn_capable_param_t; 308} sctp_ecn_capable_param_t;
309 309
310/* ADDIP Section 3.2.6 Adaptation Layer Indication */ 310/* ADDIP Section 3.2.6 Adaptation Layer Indication */
@@ -321,19 +321,19 @@ typedef struct sctp_supported_ext_param {
321 321
322/* AUTH Section 3.1 Random */ 322/* AUTH Section 3.1 Random */
323typedef struct sctp_random_param { 323typedef struct sctp_random_param {
324 sctp_paramhdr_t param_hdr; 324 struct sctp_paramhdr param_hdr;
325 __u8 random_val[0]; 325 __u8 random_val[0];
326} sctp_random_param_t; 326} sctp_random_param_t;
327 327
328/* AUTH Section 3.2 Chunk List */ 328/* AUTH Section 3.2 Chunk List */
329typedef struct sctp_chunks_param { 329typedef struct sctp_chunks_param {
330 sctp_paramhdr_t param_hdr; 330 struct sctp_paramhdr param_hdr;
331 __u8 chunks[0]; 331 __u8 chunks[0];
332} sctp_chunks_param_t; 332} sctp_chunks_param_t;
333 333
334/* AUTH Section 3.3 HMAC Algorithm */ 334/* AUTH Section 3.3 HMAC Algorithm */
335typedef struct sctp_hmac_algo_param { 335typedef struct sctp_hmac_algo_param {
336 sctp_paramhdr_t param_hdr; 336 struct sctp_paramhdr param_hdr;
337 __be16 hmac_ids[0]; 337 __be16 hmac_ids[0];
338} sctp_hmac_algo_param_t; 338} sctp_hmac_algo_param_t;
339 339
@@ -345,14 +345,14 @@ typedef sctp_init_chunk_t sctp_initack_chunk_t;
345 345
346/* Section 3.3.3.1 State Cookie (7) */ 346/* Section 3.3.3.1 State Cookie (7) */
347typedef struct sctp_cookie_param { 347typedef struct sctp_cookie_param {
348 sctp_paramhdr_t p; 348 struct sctp_paramhdr p;
349 __u8 body[0]; 349 __u8 body[0];
350} sctp_cookie_param_t; 350} sctp_cookie_param_t;
351 351
352/* Section 3.3.3.1 Unrecognized Parameters (8) */ 352/* Section 3.3.3.1 Unrecognized Parameters (8) */
353typedef struct sctp_unrecognized_param { 353typedef struct sctp_unrecognized_param {
354 sctp_paramhdr_t param_hdr; 354 struct sctp_paramhdr param_hdr;
355 sctp_paramhdr_t unrecognized; 355 struct sctp_paramhdr unrecognized;
356} sctp_unrecognized_param_t; 356} sctp_unrecognized_param_t;
357 357
358 358
@@ -399,7 +399,7 @@ typedef struct sctp_sack_chunk {
399 */ 399 */
400 400
401typedef struct sctp_heartbeathdr { 401typedef struct sctp_heartbeathdr {
402 sctp_paramhdr_t info; 402 struct sctp_paramhdr info;
403} sctp_heartbeathdr_t; 403} sctp_heartbeathdr_t;
404 404
405typedef struct sctp_heartbeat_chunk { 405typedef struct sctp_heartbeat_chunk {
@@ -639,7 +639,7 @@ struct sctp_fwdtsn_chunk {
639 * report status of ASCONF processing. 639 * report status of ASCONF processing.
640 */ 640 */
641typedef struct sctp_addip_param { 641typedef struct sctp_addip_param {
642 sctp_paramhdr_t param_hdr; 642 struct sctp_paramhdr param_hdr;
643 __be32 crr_id; 643 __be32 crr_id;
644} sctp_addip_param_t; 644} sctp_addip_param_t;
645 645
@@ -724,7 +724,7 @@ struct sctp_reconf_chunk {
724}; 724};
725 725
726struct sctp_strreset_outreq { 726struct sctp_strreset_outreq {
727 sctp_paramhdr_t param_hdr; 727 struct sctp_paramhdr param_hdr;
728 __u32 request_seq; 728 __u32 request_seq;
729 __u32 response_seq; 729 __u32 response_seq;
730 __u32 send_reset_at_tsn; 730 __u32 send_reset_at_tsn;
@@ -732,18 +732,18 @@ struct sctp_strreset_outreq {
732}; 732};
733 733
734struct sctp_strreset_inreq { 734struct sctp_strreset_inreq {
735 sctp_paramhdr_t param_hdr; 735 struct sctp_paramhdr param_hdr;
736 __u32 request_seq; 736 __u32 request_seq;
737 __u16 list_of_streams[0]; 737 __u16 list_of_streams[0];
738}; 738};
739 739
740struct sctp_strreset_tsnreq { 740struct sctp_strreset_tsnreq {
741 sctp_paramhdr_t param_hdr; 741 struct sctp_paramhdr param_hdr;
742 __u32 request_seq; 742 __u32 request_seq;
743}; 743};
744 744
745struct sctp_strreset_addstrm { 745struct sctp_strreset_addstrm {
746 sctp_paramhdr_t param_hdr; 746 struct sctp_paramhdr param_hdr;
747 __u32 request_seq; 747 __u32 request_seq;
748 __u16 number_of_streams; 748 __u16 number_of_streams;
749 __u16 reserved; 749 __u16 reserved;
@@ -760,13 +760,13 @@ enum {
760}; 760};
761 761
762struct sctp_strreset_resp { 762struct sctp_strreset_resp {
763 sctp_paramhdr_t param_hdr; 763 struct sctp_paramhdr param_hdr;
764 __u32 response_seq; 764 __u32 response_seq;
765 __u32 result; 765 __u32 result;
766}; 766};
767 767
768struct sctp_strreset_resptsn { 768struct sctp_strreset_resptsn {
769 sctp_paramhdr_t param_hdr; 769 struct sctp_paramhdr param_hdr;
770 __u32 response_seq; 770 __u32 response_seq;
771 __u32 result; 771 __u32 result;
772 __u32 senders_next_tsn; 772 __u32 senders_next_tsn;