diff options
Diffstat (limited to 'include/net/sctp/user.h')
-rw-r--r-- | include/net/sctp/user.h | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h index f6328aeddcce..1c5f19f995ad 100644 --- a/include/net/sctp/user.h +++ b/include/net/sctp/user.h | |||
@@ -103,16 +103,20 @@ enum sctp_optname { | |||
103 | #define SCTP_SOCKOPT_BINDX_REM SCTP_SOCKOPT_BINDX_REM | 103 | #define SCTP_SOCKOPT_BINDX_REM SCTP_SOCKOPT_BINDX_REM |
104 | SCTP_SOCKOPT_PEELOFF, /* peel off association. */ | 104 | SCTP_SOCKOPT_PEELOFF, /* peel off association. */ |
105 | #define SCTP_SOCKOPT_PEELOFF SCTP_SOCKOPT_PEELOFF | 105 | #define SCTP_SOCKOPT_PEELOFF SCTP_SOCKOPT_PEELOFF |
106 | SCTP_GET_PEER_ADDRS_NUM, /* Get number of peer addresss. */ | 106 | SCTP_GET_PEER_ADDRS_NUM_OLD, /* Get number of peer addresss. */ |
107 | #define SCTP_GET_PEER_ADDRS_NUM SCTP_GET_PEER_ADDRS_NUM | 107 | #define SCTP_GET_PEER_ADDRS_NUM_OLD SCTP_GET_PEER_ADDRS_NUM_OLD |
108 | SCTP_GET_PEER_ADDRS_OLD, /* Get all peer addresss. */ | ||
109 | #define SCTP_GET_PEER_ADDRS_OLD SCTP_GET_PEER_ADDRS_OLD | ||
110 | SCTP_GET_LOCAL_ADDRS_NUM_OLD, /* Get number of local addresss. */ | ||
111 | #define SCTP_GET_LOCAL_ADDRS_NUM_OLD SCTP_GET_LOCAL_ADDRS_NUM_OLD | ||
112 | SCTP_GET_LOCAL_ADDRS_OLD, /* Get all local addresss. */ | ||
113 | #define SCTP_GET_LOCAL_ADDRS_OLD SCTP_GET_LOCAL_ADDRS_OLD | ||
114 | SCTP_SOCKOPT_CONNECTX, /* CONNECTX requests. */ | ||
115 | #define SCTP_SOCKOPT_CONNECTX SCTP_SOCKOPT_CONNECTX | ||
108 | SCTP_GET_PEER_ADDRS, /* Get all peer addresss. */ | 116 | SCTP_GET_PEER_ADDRS, /* Get all peer addresss. */ |
109 | #define SCTP_GET_PEER_ADDRS SCTP_GET_PEER_ADDRS | 117 | #define SCTP_GET_PEER_ADDRS SCTP_GET_PEER_ADDRS |
110 | SCTP_GET_LOCAL_ADDRS_NUM, /* Get number of local addresss. */ | ||
111 | #define SCTP_GET_LOCAL_ADDRS_NUM SCTP_GET_LOCAL_ADDRS_NUM | ||
112 | SCTP_GET_LOCAL_ADDRS, /* Get all local addresss. */ | 118 | SCTP_GET_LOCAL_ADDRS, /* Get all local addresss. */ |
113 | #define SCTP_GET_LOCAL_ADDRS SCTP_GET_LOCAL_ADDRS | 119 | #define SCTP_GET_LOCAL_ADDRS SCTP_GET_LOCAL_ADDRS |
114 | SCTP_SOCKOPT_CONNECTX, /* CONNECTX requests. */ | ||
115 | #define SCTP_SOCKOPT_CONNECTX SCTP_SOCKOPT_CONNECTX | ||
116 | }; | 120 | }; |
117 | 121 | ||
118 | /* | 122 | /* |
@@ -239,7 +243,7 @@ struct sctp_paddr_change { | |||
239 | int spc_state; | 243 | int spc_state; |
240 | int spc_error; | 244 | int spc_error; |
241 | sctp_assoc_t spc_assoc_id; | 245 | sctp_assoc_t spc_assoc_id; |
242 | }; | 246 | } __attribute__((packed, aligned(4))); |
243 | 247 | ||
244 | /* | 248 | /* |
245 | * spc_state: 32 bits (signed integer) | 249 | * spc_state: 32 bits (signed integer) |
@@ -464,7 +468,7 @@ struct sctp_assocparams { | |||
464 | struct sctp_setpeerprim { | 468 | struct sctp_setpeerprim { |
465 | sctp_assoc_t sspp_assoc_id; | 469 | sctp_assoc_t sspp_assoc_id; |
466 | struct sockaddr_storage sspp_addr; | 470 | struct sockaddr_storage sspp_addr; |
467 | }; | 471 | } __attribute__((packed, aligned(4))); |
468 | 472 | ||
469 | /* | 473 | /* |
470 | * 7.1.10 Set Primary Address (SCTP_PRIMARY_ADDR) | 474 | * 7.1.10 Set Primary Address (SCTP_PRIMARY_ADDR) |
@@ -477,7 +481,7 @@ struct sctp_setpeerprim { | |||
477 | struct sctp_prim { | 481 | struct sctp_prim { |
478 | sctp_assoc_t ssp_assoc_id; | 482 | sctp_assoc_t ssp_assoc_id; |
479 | struct sockaddr_storage ssp_addr; | 483 | struct sockaddr_storage ssp_addr; |
480 | }; | 484 | } __attribute__((packed, aligned(4))); |
481 | 485 | ||
482 | /* | 486 | /* |
483 | * 7.1.11 Set Adaption Layer Indicator (SCTP_ADAPTION_LAYER) | 487 | * 7.1.11 Set Adaption Layer Indicator (SCTP_ADAPTION_LAYER) |
@@ -504,7 +508,7 @@ struct sctp_paddrparams { | |||
504 | struct sockaddr_storage spp_address; | 508 | struct sockaddr_storage spp_address; |
505 | __u32 spp_hbinterval; | 509 | __u32 spp_hbinterval; |
506 | __u16 spp_pathmaxrxt; | 510 | __u16 spp_pathmaxrxt; |
507 | }; | 511 | } __attribute__((packed, aligned(4))); |
508 | 512 | ||
509 | /* | 513 | /* |
510 | * 7.2.2 Peer Address Information | 514 | * 7.2.2 Peer Address Information |
@@ -523,7 +527,7 @@ struct sctp_paddrinfo { | |||
523 | __u32 spinfo_srtt; | 527 | __u32 spinfo_srtt; |
524 | __u32 spinfo_rto; | 528 | __u32 spinfo_rto; |
525 | __u32 spinfo_mtu; | 529 | __u32 spinfo_mtu; |
526 | }; | 530 | } __attribute__((packed, aligned(4))); |
527 | 531 | ||
528 | /* Peer addresses's state. */ | 532 | /* Peer addresses's state. */ |
529 | enum sctp_spinfo_state { | 533 | enum sctp_spinfo_state { |
@@ -559,11 +563,16 @@ struct sctp_status { | |||
559 | * SCTP_GET_LOCAL_ADDRS socket options used internally to implement | 563 | * SCTP_GET_LOCAL_ADDRS socket options used internally to implement |
560 | * sctp_getpaddrs() and sctp_getladdrs() API. | 564 | * sctp_getpaddrs() and sctp_getladdrs() API. |
561 | */ | 565 | */ |
562 | struct sctp_getaddrs { | 566 | struct sctp_getaddrs_old { |
563 | sctp_assoc_t assoc_id; | 567 | sctp_assoc_t assoc_id; |
564 | int addr_num; | 568 | int addr_num; |
565 | struct sockaddr __user *addrs; | 569 | struct sockaddr __user *addrs; |
566 | }; | 570 | }; |
571 | struct sctp_getaddrs { | ||
572 | sctp_assoc_t assoc_id; /*input*/ | ||
573 | __u32 addr_num; /*output*/ | ||
574 | __u8 addrs[0]; /*output, variable size*/ | ||
575 | }; | ||
567 | 576 | ||
568 | /* These are bit fields for msghdr->msg_flags. See section 5.1. */ | 577 | /* These are bit fields for msghdr->msg_flags. See section 5.1. */ |
569 | /* On user space Linux, these live in <bits/socket.h> as an enum. */ | 578 | /* On user space Linux, these live in <bits/socket.h> as an enum. */ |