diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2009-09-14 14:26:05 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2009-09-14 14:26:05 -0400 |
commit | ac8d513a6801c8636922ccf4f30211810c9a56ce (patch) | |
tree | 83ba584487a6a612c8fcf2563c28c0263df35ba2 /include/net/sctp/structs.h | |
parent | bf992fa2bc1ad1bb2aeb0bdfadb43f236b9297fd (diff) | |
parent | 99bc47067910f7070e65ee318a6dd79a2371f1e5 (diff) |
Merge branch 'master' into for-linus
Diffstat (limited to 'include/net/sctp/structs.h')
-rw-r--r-- | include/net/sctp/structs.h | 63 |
1 files changed, 34 insertions, 29 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index edfcacf3250e..42d00ced5eb8 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -219,6 +219,15 @@ extern struct sctp_globals { | |||
219 | /* Flag to idicate if SCTP-AUTH is enabled */ | 219 | /* Flag to idicate if SCTP-AUTH is enabled */ |
220 | int auth_enable; | 220 | int auth_enable; |
221 | 221 | ||
222 | /* | ||
223 | * Policy to control SCTP IPv4 address scoping | ||
224 | * 0 - Disable IPv4 address scoping | ||
225 | * 1 - Enable IPv4 address scoping | ||
226 | * 2 - Selectively allow only IPv4 private addresses | ||
227 | * 3 - Selectively allow only IPv4 link local address | ||
228 | */ | ||
229 | int ipv4_scope_policy; | ||
230 | |||
222 | /* Flag to indicate whether computing and verifying checksum | 231 | /* Flag to indicate whether computing and verifying checksum |
223 | * is disabled. */ | 232 | * is disabled. */ |
224 | int checksum_disable; | 233 | int checksum_disable; |
@@ -252,6 +261,7 @@ extern struct sctp_globals { | |||
252 | #define sctp_port_hashtable (sctp_globals.port_hashtable) | 261 | #define sctp_port_hashtable (sctp_globals.port_hashtable) |
253 | #define sctp_local_addr_list (sctp_globals.local_addr_list) | 262 | #define sctp_local_addr_list (sctp_globals.local_addr_list) |
254 | #define sctp_local_addr_lock (sctp_globals.addr_list_lock) | 263 | #define sctp_local_addr_lock (sctp_globals.addr_list_lock) |
264 | #define sctp_scope_policy (sctp_globals.ipv4_scope_policy) | ||
255 | #define sctp_addip_enable (sctp_globals.addip_enable) | 265 | #define sctp_addip_enable (sctp_globals.addip_enable) |
256 | #define sctp_addip_noauth (sctp_globals.addip_noauth_enable) | 266 | #define sctp_addip_noauth (sctp_globals.addip_noauth_enable) |
257 | #define sctp_prsctp_enable (sctp_globals.prsctp_enable) | 267 | #define sctp_prsctp_enable (sctp_globals.prsctp_enable) |
@@ -628,7 +638,7 @@ struct sctp_datamsg { | |||
628 | /* Chunks waiting to be submitted to lower layer. */ | 638 | /* Chunks waiting to be submitted to lower layer. */ |
629 | struct list_head chunks; | 639 | struct list_head chunks; |
630 | /* Chunks that have been transmitted. */ | 640 | /* Chunks that have been transmitted. */ |
631 | struct list_head track; | 641 | size_t msg_size; |
632 | /* Reference counting. */ | 642 | /* Reference counting. */ |
633 | atomic_t refcnt; | 643 | atomic_t refcnt; |
634 | /* When is this message no longer interesting to the peer? */ | 644 | /* When is this message no longer interesting to the peer? */ |
@@ -643,6 +653,7 @@ struct sctp_datamsg { | |||
643 | struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *, | 653 | struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *, |
644 | struct sctp_sndrcvinfo *, | 654 | struct sctp_sndrcvinfo *, |
645 | struct msghdr *, int len); | 655 | struct msghdr *, int len); |
656 | void sctp_datamsg_free(struct sctp_datamsg *); | ||
646 | void sctp_datamsg_put(struct sctp_datamsg *); | 657 | void sctp_datamsg_put(struct sctp_datamsg *); |
647 | void sctp_chunk_fail(struct sctp_chunk *, int error); | 658 | void sctp_chunk_fail(struct sctp_chunk *, int error); |
648 | int sctp_chunk_abandoned(struct sctp_chunk *); | 659 | int sctp_chunk_abandoned(struct sctp_chunk *); |
@@ -811,22 +822,12 @@ struct sctp_packet { | |||
811 | /* pointer to the auth chunk for this packet */ | 822 | /* pointer to the auth chunk for this packet */ |
812 | struct sctp_chunk *auth; | 823 | struct sctp_chunk *auth; |
813 | 824 | ||
814 | /* This packet contains a COOKIE-ECHO chunk. */ | 825 | u8 has_cookie_echo:1, /* This packet contains a COOKIE-ECHO chunk. */ |
815 | __u8 has_cookie_echo; | 826 | has_sack:1, /* This packet contains a SACK chunk. */ |
816 | 827 | has_auth:1, /* This packet contains an AUTH chunk */ | |
817 | /* This packet contains a SACK chunk. */ | 828 | has_data:1, /* This packet contains at least 1 DATA chunk */ |
818 | __u8 has_sack; | 829 | ipfragok:1, /* So let ip fragment this packet */ |
819 | 830 | malloced:1; /* Is it malloced? */ | |
820 | /* This packet contains an AUTH chunk */ | ||
821 | __u8 has_auth; | ||
822 | |||
823 | /* This packet contains at least 1 DATA chunk */ | ||
824 | __u8 has_data; | ||
825 | |||
826 | /* SCTP cannot fragment this packet. So let ip fragment it. */ | ||
827 | __u8 ipfragok; | ||
828 | |||
829 | __u8 malloced; | ||
830 | }; | 831 | }; |
831 | 832 | ||
832 | struct sctp_packet *sctp_packet_init(struct sctp_packet *, | 833 | struct sctp_packet *sctp_packet_init(struct sctp_packet *, |
@@ -1567,13 +1568,13 @@ struct sctp_association { | |||
1567 | __u32 sack_cnt; | 1568 | __u32 sack_cnt; |
1568 | 1569 | ||
1569 | /* These are capabilities which our peer advertised. */ | 1570 | /* These are capabilities which our peer advertised. */ |
1570 | __u8 ecn_capable; /* Can peer do ECN? */ | 1571 | __u8 ecn_capable:1, /* Can peer do ECN? */ |
1571 | __u8 ipv4_address; /* Peer understands IPv4 addresses? */ | 1572 | ipv4_address:1, /* Peer understands IPv4 addresses? */ |
1572 | __u8 ipv6_address; /* Peer understands IPv6 addresses? */ | 1573 | ipv6_address:1, /* Peer understands IPv6 addresses? */ |
1573 | __u8 hostname_address;/* Peer understands DNS addresses? */ | 1574 | hostname_address:1, /* Peer understands DNS addresses? */ |
1574 | __u8 asconf_capable; /* Does peer support ADDIP? */ | 1575 | asconf_capable:1, /* Does peer support ADDIP? */ |
1575 | __u8 prsctp_capable; /* Can peer do PR-SCTP? */ | 1576 | prsctp_capable:1, /* Can peer do PR-SCTP? */ |
1576 | __u8 auth_capable; /* Is peer doing SCTP-AUTH? */ | 1577 | auth_capable:1; /* Is peer doing SCTP-AUTH? */ |
1577 | 1578 | ||
1578 | __u32 adaptation_ind; /* Adaptation Code point. */ | 1579 | __u32 adaptation_ind; /* Adaptation Code point. */ |
1579 | 1580 | ||
@@ -1738,6 +1739,12 @@ struct sctp_association { | |||
1738 | */ | 1739 | */ |
1739 | __u32 rwnd_over; | 1740 | __u32 rwnd_over; |
1740 | 1741 | ||
1742 | /* Keeps treack of rwnd pressure. This happens when we have | ||
1743 | * a window, but not recevie buffer (i.e small packets). This one | ||
1744 | * is releases slowly (1 PMTU at a time ). | ||
1745 | */ | ||
1746 | __u32 rwnd_press; | ||
1747 | |||
1741 | /* This is the sndbuf size in use for the association. | 1748 | /* This is the sndbuf size in use for the association. |
1742 | * This corresponds to the sndbuf size for the association, | 1749 | * This corresponds to the sndbuf size for the association, |
1743 | * as specified in the sk->sndbuf. | 1750 | * as specified in the sk->sndbuf. |
@@ -1756,6 +1763,7 @@ struct sctp_association { | |||
1756 | 1763 | ||
1757 | /* The message size at which SCTP fragmentation will occur. */ | 1764 | /* The message size at which SCTP fragmentation will occur. */ |
1758 | __u32 frag_point; | 1765 | __u32 frag_point; |
1766 | __u32 user_frag; | ||
1759 | 1767 | ||
1760 | /* Counter used to count INIT errors. */ | 1768 | /* Counter used to count INIT errors. */ |
1761 | int init_err_counter; | 1769 | int init_err_counter; |
@@ -1905,11 +1913,8 @@ struct sctp_association { | |||
1905 | 1913 | ||
1906 | __u16 active_key_id; | 1914 | __u16 active_key_id; |
1907 | 1915 | ||
1908 | /* Need to send an ECNE Chunk? */ | 1916 | __u8 need_ecne:1, /* Need to send an ECNE Chunk? */ |
1909 | char need_ecne; | 1917 | temp:1; /* Is it a temporary association? */ |
1910 | |||
1911 | /* Is it a temporary association? */ | ||
1912 | char temp; | ||
1913 | }; | 1918 | }; |
1914 | 1919 | ||
1915 | 1920 | ||