structs.h (1ed1fe24170082bd82f62282eea0d0f8d0462a8e) | structs.h (0c5dc070ff3d6246d22ddd931f23a6266249e3db) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2/* SCTP kernel implementation 3 * (C) Copyright IBM Corp. 2001, 2004 4 * Copyright (c) 1999-2000 Cisco, Inc. 5 * Copyright (c) 1999-2001 Motorola, Inc. 6 * Copyright (c) 2001 Intel Corp. 7 * 8 * This file is part of the SCTP kernel implementation --- 163 unchanged lines hidden (view full) --- 172 __u32 default_rcv_context; 173 int max_burst; 174 175 /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to 176 * the destination address every heartbeat interval. This value 177 * will be inherited by all new associations. 178 */ 179 __u32 hbinterval; | 1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2/* SCTP kernel implementation 3 * (C) Copyright IBM Corp. 2001, 2004 4 * Copyright (c) 1999-2000 Cisco, Inc. 5 * Copyright (c) 1999-2001 Motorola, Inc. 6 * Copyright (c) 2001 Intel Corp. 7 * 8 * This file is part of the SCTP kernel implementation --- 163 unchanged lines hidden (view full) --- 172 __u32 default_rcv_context; 173 int max_burst; 174 175 /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to 176 * the destination address every heartbeat interval. This value 177 * will be inherited by all new associations. 178 */ 179 __u32 hbinterval; |
180 __u32 probe_interval; | |
181 182 __be16 udp_port; 183 __be16 encap_port; 184 185 /* This is the max_retrans value for new associations. */ 186 __u16 pathmaxrxt; 187 188 __u32 flowlabel; --- 192 unchanged lines hidden (view full) --- 381 * chunk is sent and the destination transport address to which this 382 * HEARTBEAT is sent (see Section 8.3). 383 */ 384struct sctp_sender_hb_info { 385 struct sctp_paramhdr param_hdr; 386 union sctp_addr daddr; 387 unsigned long sent_at; 388 __u64 hb_nonce; | 180 181 __be16 udp_port; 182 __be16 encap_port; 183 184 /* This is the max_retrans value for new associations. */ 185 __u16 pathmaxrxt; 186 187 __u32 flowlabel; --- 192 unchanged lines hidden (view full) --- 380 * chunk is sent and the destination transport address to which this 381 * HEARTBEAT is sent (see Section 8.3). 382 */ 383struct sctp_sender_hb_info { 384 struct sctp_paramhdr param_hdr; 385 union sctp_addr daddr; 386 unsigned long sent_at; 387 __u64 hb_nonce; |
389 __u32 probe_size; | |
390}; 391 392int sctp_stream_init(struct sctp_stream *stream, __u16 outcnt, __u16 incnt, 393 gfp_t gfp); 394int sctp_stream_init_ext(struct sctp_stream *stream, __u16 sid); 395void sctp_stream_free(struct sctp_stream *stream); 396void sctp_stream_clear(struct sctp_stream *stream); 397void sctp_stream_update(struct sctp_stream *stream, struct sctp_stream *new); --- 60 unchanged lines hidden (view full) --- 458 const union sctp_addr *addr2); 459 void (*addr_copy) (union sctp_addr *dst, 460 union sctp_addr *src); 461 void (*from_skb) (union sctp_addr *, 462 struct sk_buff *skb, 463 int saddr); 464 void (*from_sk) (union sctp_addr *, 465 struct sock *sk); | 388}; 389 390int sctp_stream_init(struct sctp_stream *stream, __u16 outcnt, __u16 incnt, 391 gfp_t gfp); 392int sctp_stream_init_ext(struct sctp_stream *stream, __u16 sid); 393void sctp_stream_free(struct sctp_stream *stream); 394void sctp_stream_clear(struct sctp_stream *stream); 395void sctp_stream_update(struct sctp_stream *stream, struct sctp_stream *new); --- 60 unchanged lines hidden (view full) --- 456 const union sctp_addr *addr2); 457 void (*addr_copy) (union sctp_addr *dst, 458 union sctp_addr *src); 459 void (*from_skb) (union sctp_addr *, 460 struct sk_buff *skb, 461 int saddr); 462 void (*from_sk) (union sctp_addr *, 463 struct sock *sk); |
466 void (*from_addr_param) (union sctp_addr *, | 464 bool (*from_addr_param) (union sctp_addr *, |
467 union sctp_addr_param *, 468 __be16 port, int iif); 469 int (*to_addr_param) (const union sctp_addr *, 470 union sctp_addr_param *); 471 int (*addr_valid) (union sctp_addr *, 472 struct sctp_sock *, 473 const struct sk_buff *); 474 enum sctp_scope (*scope)(union sctp_addr *); --- 178 unchanged lines hidden (view full) --- 653 singleton:1, /* Only chunk in the packet? */ 654 end_of_packet:1, /* Last chunk in the packet? */ 655 ecn_ce_done:1, /* Have we processed the ECN CE bit? */ 656 pdiscard:1, /* Discard the whole packet now? */ 657 tsn_gap_acked:1, /* Is this chunk acked by a GAP ACK? */ 658 data_accepted:1, /* At least 1 chunk accepted */ 659 auth:1, /* IN: was auth'ed | OUT: needs auth */ 660 has_asconf:1, /* IN: have seen an asconf before */ | 465 union sctp_addr_param *, 466 __be16 port, int iif); 467 int (*to_addr_param) (const union sctp_addr *, 468 union sctp_addr_param *); 469 int (*addr_valid) (union sctp_addr *, 470 struct sctp_sock *, 471 const struct sk_buff *); 472 enum sctp_scope (*scope)(union sctp_addr *); --- 178 unchanged lines hidden (view full) --- 651 singleton:1, /* Only chunk in the packet? */ 652 end_of_packet:1, /* Last chunk in the packet? */ 653 ecn_ce_done:1, /* Have we processed the ECN CE bit? */ 654 pdiscard:1, /* Discard the whole packet now? */ 655 tsn_gap_acked:1, /* Is this chunk acked by a GAP ACK? */ 656 data_accepted:1, /* At least 1 chunk accepted */ 657 auth:1, /* IN: was auth'ed | OUT: needs auth */ 658 has_asconf:1, /* IN: have seen an asconf before */ |
661 pmtu_probe:1, /* Used by PLPMTUD, can be set in s HB chunk */ | |
662 tsn_missing_report:2, /* Data chunk missing counter. */ 663 fast_retransmit:2; /* Is this chunk fast retransmitted? */ 664}; 665 666#define sctp_chunk_retransmitted(chunk) (chunk->sent_count > 1) 667void sctp_chunk_hold(struct sctp_chunk *); 668void sctp_chunk_put(struct sctp_chunk *); 669int sctp_user_addto_chunk(struct sctp_chunk *chunk, int len, --- 186 unchanged lines hidden (view full) --- 856 struct dst_entry *dst; 857 /* Source address. */ 858 union sctp_addr saddr; 859 860 /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to 861 * the destination address every heartbeat interval. 862 */ 863 unsigned long hbinterval; | 659 tsn_missing_report:2, /* Data chunk missing counter. */ 660 fast_retransmit:2; /* Is this chunk fast retransmitted? */ 661}; 662 663#define sctp_chunk_retransmitted(chunk) (chunk->sent_count > 1) 664void sctp_chunk_hold(struct sctp_chunk *); 665void sctp_chunk_put(struct sctp_chunk *); 666int sctp_user_addto_chunk(struct sctp_chunk *chunk, int len, --- 186 unchanged lines hidden (view full) --- 853 struct dst_entry *dst; 854 /* Source address. */ 855 union sctp_addr saddr; 856 857 /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to 858 * the destination address every heartbeat interval. 859 */ 860 unsigned long hbinterval; |
864 unsigned long probe_interval; | |
865 866 /* SACK delay timeout */ 867 unsigned long sackdelay; 868 __u32 sackfreq; 869 870 atomic_t mtu_info; 871 872 /* When was the last time that we heard from this transport? We use --- 60 unchanged lines hidden (view full) --- 933 struct timer_list hb_timer; 934 935 /* Timer to handle ICMP proto unreachable envets */ 936 struct timer_list proto_unreach_timer; 937 938 /* Timer to handler reconf chunk rtx */ 939 struct timer_list reconf_timer; 940 | 861 862 /* SACK delay timeout */ 863 unsigned long sackdelay; 864 __u32 sackfreq; 865 866 atomic_t mtu_info; 867 868 /* When was the last time that we heard from this transport? We use --- 60 unchanged lines hidden (view full) --- 929 struct timer_list hb_timer; 930 931 /* Timer to handle ICMP proto unreachable envets */ 932 struct timer_list proto_unreach_timer; 933 934 /* Timer to handler reconf chunk rtx */ 935 struct timer_list reconf_timer; 936 |
941 /* Timer to send a probe HB packet for PLPMTUD */ 942 struct timer_list probe_timer; 943 | |
944 /* Since we're using per-destination retransmission timers 945 * (see above), we're also using per-destination "transmitted" 946 * queues. This probably ought to be a private struct 947 * accessible only within the outqueue, but it's not, yet. 948 */ 949 struct list_head transmitted; 950 951 /* We build bundle-able packets for this transport here. */ --- 26 unchanged lines hidden (view full) --- 978 char cycling_changeover; 979 980 /* A temporary flag, which is used during the processing of 981 * a SACK to estimate the causative TSN(s)'s group. 982 */ 983 char cacc_saw_newack; 984 } cacc; 985 | 937 /* Since we're using per-destination retransmission timers 938 * (see above), we're also using per-destination "transmitted" 939 * queues. This probably ought to be a private struct 940 * accessible only within the outqueue, but it's not, yet. 941 */ 942 struct list_head transmitted; 943 944 /* We build bundle-able packets for this transport here. */ --- 26 unchanged lines hidden (view full) --- 971 char cycling_changeover; 972 973 /* A temporary flag, which is used during the processing of 974 * a SACK to estimate the causative TSN(s)'s group. 975 */ 976 char cacc_saw_newack; 977 } cacc; 978 |
986 struct { 987 __u16 pmtu; 988 __u16 probe_size; 989 __u16 probe_high; 990 __u8 probe_count:3; 991 __u8 raise_count:5; 992 __u8 state; 993 } pl; /* plpmtud related */ 994 | |
995 /* 64-bit random number sent with heartbeat. */ 996 __u64 hb_nonce; 997 998 struct rcu_head rcu; 999}; 1000 1001struct sctp_transport *sctp_transport_new(struct net *, const union sctp_addr *, 1002 gfp_t); 1003void sctp_transport_set_owner(struct sctp_transport *, 1004 struct sctp_association *); 1005void sctp_transport_route(struct sctp_transport *, union sctp_addr *, 1006 struct sctp_sock *); 1007void sctp_transport_pmtu(struct sctp_transport *, struct sock *sk); 1008void sctp_transport_free(struct sctp_transport *); 1009void sctp_transport_reset_t3_rtx(struct sctp_transport *); 1010void sctp_transport_reset_hb_timer(struct sctp_transport *); 1011void sctp_transport_reset_reconf_timer(struct sctp_transport *transport); | 979 /* 64-bit random number sent with heartbeat. */ 980 __u64 hb_nonce; 981 982 struct rcu_head rcu; 983}; 984 985struct sctp_transport *sctp_transport_new(struct net *, const union sctp_addr *, 986 gfp_t); 987void sctp_transport_set_owner(struct sctp_transport *, 988 struct sctp_association *); 989void sctp_transport_route(struct sctp_transport *, union sctp_addr *, 990 struct sctp_sock *); 991void sctp_transport_pmtu(struct sctp_transport *, struct sock *sk); 992void sctp_transport_free(struct sctp_transport *); 993void sctp_transport_reset_t3_rtx(struct sctp_transport *); 994void sctp_transport_reset_hb_timer(struct sctp_transport *); 995void sctp_transport_reset_reconf_timer(struct sctp_transport *transport); |
1012void sctp_transport_reset_probe_timer(struct sctp_transport *transport); | |
1013int sctp_transport_hold(struct sctp_transport *); 1014void sctp_transport_put(struct sctp_transport *); 1015void sctp_transport_update_rto(struct sctp_transport *, __u32); 1016void sctp_transport_raise_cwnd(struct sctp_transport *, __u32, __u32); 1017void sctp_transport_lower_cwnd(struct sctp_transport *t, 1018 enum sctp_lower_cwnd reason); 1019void sctp_transport_burst_limited(struct sctp_transport *); 1020void sctp_transport_burst_reset(struct sctp_transport *); 1021unsigned long sctp_transport_timeout(struct sctp_transport *); 1022void sctp_transport_reset(struct sctp_transport *t); 1023bool sctp_transport_update_pmtu(struct sctp_transport *t, u32 pmtu); 1024void sctp_transport_immediate_rtx(struct sctp_transport *); 1025void sctp_transport_dst_release(struct sctp_transport *t); 1026void sctp_transport_dst_confirm(struct sctp_transport *t); | 996int sctp_transport_hold(struct sctp_transport *); 997void sctp_transport_put(struct sctp_transport *); 998void sctp_transport_update_rto(struct sctp_transport *, __u32); 999void sctp_transport_raise_cwnd(struct sctp_transport *, __u32, __u32); 1000void sctp_transport_lower_cwnd(struct sctp_transport *t, 1001 enum sctp_lower_cwnd reason); 1002void sctp_transport_burst_limited(struct sctp_transport *); 1003void sctp_transport_burst_reset(struct sctp_transport *); 1004unsigned long sctp_transport_timeout(struct sctp_transport *); 1005void sctp_transport_reset(struct sctp_transport *t); 1006bool sctp_transport_update_pmtu(struct sctp_transport *t, u32 pmtu); 1007void sctp_transport_immediate_rtx(struct sctp_transport *); 1008void sctp_transport_dst_release(struct sctp_transport *t); 1009void sctp_transport_dst_confirm(struct sctp_transport *t); |
1027void sctp_transport_pl_send(struct sctp_transport *t); 1028void sctp_transport_pl_recv(struct sctp_transport *t); | |
1029 1030 1031/* This is the structure we use to queue packets as they come into 1032 * SCTP. We write packets to it and read chunks from it. 1033 */ 1034struct sctp_inq { 1035 /* This is actually a queue of sctp_chunk each 1036 * containing a partially decoded packet. --- 772 unchanged lines hidden (view full) --- 1809 /* The largest timeout or RTO value to use in attempting an INIT */ 1810 unsigned long max_init_timeo; 1811 1812 /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to 1813 * the destination address every heartbeat interval. This value 1814 * will be inherited by all new transports. 1815 */ 1816 unsigned long hbinterval; | 1010 1011 1012/* This is the structure we use to queue packets as they come into 1013 * SCTP. We write packets to it and read chunks from it. 1014 */ 1015struct sctp_inq { 1016 /* This is actually a queue of sctp_chunk each 1017 * containing a partially decoded packet. --- 772 unchanged lines hidden (view full) --- 1790 /* The largest timeout or RTO value to use in attempting an INIT */ 1791 unsigned long max_init_timeo; 1792 1793 /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to 1794 * the destination address every heartbeat interval. This value 1795 * will be inherited by all new transports. 1796 */ 1797 unsigned long hbinterval; |
1817 unsigned long probe_interval; | |
1818 1819 __be16 encap_port; 1820 1821 /* This is the max_retrans value for new transports in the 1822 * association. 1823 */ 1824 __u16 pathmaxrxt; 1825 --- 378 unchanged lines hidden --- | 1798 1799 __be16 encap_port; 1800 1801 /* This is the max_retrans value for new transports in the 1802 * association. 1803 */ 1804 __u16 pathmaxrxt; 1805 --- 378 unchanged lines hidden --- |