webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
sctputil.h
Go to the documentation of this file.
1 /*-
2  * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved.
3  * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved.
4  * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are met:
8  *
9  * a) Redistributions of source code must retain the above copyright notice,
10  * this list of conditions and the following disclaimer.
11  *
12  * b) Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in
14  * the documentation and/or other materials provided with the distribution.
15  *
16  * c) Neither the name of Cisco Systems, Inc. nor the names of its
17  * contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30  * THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
33 #ifdef __FreeBSD__
34 #include <sys/cdefs.h>
35 __FBSDID("$FreeBSD: head/sys/netinet/sctputil.h 298508 2016-04-23 09:15:58Z tuexen $");
36 #endif
37 
38 #ifndef _NETINET_SCTP_UTIL_H_
39 #define _NETINET_SCTP_UTIL_H_
40 
41 #if defined(_KERNEL) || defined(__Userspace__)
42 
43 #define SCTP_READ_LOCK_HELD 1
44 #define SCTP_READ_LOCK_NOT_HELD 0
45 
46 #ifdef SCTP_ASOCLOG_OF_TSNS
47 void sctp_print_out_track_log(struct sctp_tcb *stcb);
48 #endif
49 
50 #ifdef SCTP_MBUF_LOGGING
51 struct mbuf *sctp_m_free(struct mbuf *m);
52 void sctp_m_freem(struct mbuf *m);
53 #else
54 #define sctp_m_free m_free
55 #define sctp_m_freem m_freem
56 #endif
57 
58 #if defined(SCTP_LOCAL_TRACE_BUF) || defined(__APPLE__)
59 void
60 sctp_log_trace(uint32_t fr, const char *str SCTP_UNUSED, uint32_t a, uint32_t b, uint32_t c, uint32_t d, uint32_t e, uint32_t f);
61 #endif
62 
63 #define sctp_get_associd(stcb) ((sctp_assoc_t)stcb->asoc.assoc_id)
64 
65 
66 /*
67  * Function prototypes
68  */
69 int32_t
71 
73 sctp_get_ifa_hash_val(struct sockaddr *addr);
74 
75 struct sctp_ifa *
76 sctp_find_ifa_in_ep(struct sctp_inpcb *inp, struct sockaddr *addr, int hold_lock);
77 
78 struct sctp_ifa *
79 sctp_find_ifa_by_addr(struct sockaddr *addr, uint32_t vrf_id, int holds_lock);
80 
82 
83 uint32_t sctp_select_a_tag(struct sctp_inpcb *, uint16_t lport, uint16_t rport, int);
84 
85 int sctp_init_asoc(struct sctp_inpcb *, struct sctp_tcb *, uint32_t, uint32_t, uint16_t);
86 
87 void sctp_fill_random_store(struct sctp_pcb *);
88 
89 void
90 sctp_notify_stream_reset_add(struct sctp_tcb *stcb, uint16_t numberin,
91  uint16_t numberout, int flag);
92 void
93 sctp_notify_stream_reset_tsn(struct sctp_tcb *stcb, uint32_t sending_tsn, uint32_t recv_tsn, int flag);
94 
95 void
96 sctp_timer_start(int, struct sctp_inpcb *, struct sctp_tcb *,
97  struct sctp_nets *);
98 
99 void
100 sctp_timer_stop(int, struct sctp_inpcb *, struct sctp_tcb *,
101  struct sctp_nets *, uint32_t);
102 
103 int
104 sctp_dynamic_set_primary(struct sockaddr *sa, uint32_t vrf_id);
105 
106 void
108 
109 void
110 sctp_wakeup_the_read_socket(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
111  int so_locked
112 #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING)
114 #endif
115 );
116 
117 #if defined(__Userspace__)
118 void sctp_invoke_recv_callback(struct sctp_inpcb *,
119  struct sctp_tcb *,
120  struct sctp_queued_to_read *,
121  int);
122 
123 #endif
124 void
125 sctp_add_to_readq(struct sctp_inpcb *inp,
126  struct sctp_tcb *stcb,
127  struct sctp_queued_to_read *control,
128  struct sockbuf *sb,
129  int end,
130  int inpread_locked,
131  int so_locked
132 #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING)
134 #endif
135  );
136 
137 void sctp_iterator_worker(void);
138 
141 
142 void
143 sctp_timeout_handler(void *);
144 
145 uint32_t
146 sctp_calculate_rto(struct sctp_tcb *, struct sctp_association *,
147  struct sctp_nets *, struct timeval *, int, int);
148 
150 
151 caddr_t sctp_m_getptr(struct mbuf *, int, int, uint8_t *);
152 
153 struct sctp_paramhdr *
154 sctp_get_next_param(struct mbuf *, int,
155  struct sctp_paramhdr *, int);
156 
157 struct mbuf *
158 sctp_add_pad_tombuf(struct mbuf *, int);
159 
160 struct mbuf *
161 sctp_pad_lastmbuf(struct mbuf *, int, struct mbuf *);
162 
163 void sctp_ulp_notify(uint32_t, struct sctp_tcb *, uint32_t, void *, int
164 #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING)
166 #endif
167  );
168 
169 void
171  struct sctp_inpcb *new_inp,
172  struct sctp_tcb *stcb, int waitflags);
173 
174 
176 
177 void sctp_report_all_outbound(struct sctp_tcb *, uint16_t, int, int
178 #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING)
180 #endif
181  );
182 
184 
186  struct sctp_abort_chunk *, int
187 #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING)
189 #endif
190  );
191 
192 /* We abort responding to an IP packet for some reason */
193 void
194 sctp_abort_association(struct sctp_inpcb *, struct sctp_tcb *, struct mbuf *,
195  int, struct sockaddr *, struct sockaddr *,
196  struct sctphdr *, struct mbuf *,
197 #if defined(__FreeBSD__)
198  uint8_t, uint32_t,
199 #endif
200  uint32_t, uint16_t);
201 
202 
203 /* We choose to abort via user input */
204 void
206  struct mbuf *, int
207 #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING)
209 #endif
210 );
211 
212 void sctp_handle_ootb(struct mbuf *, int, int,
213  struct sockaddr *, struct sockaddr *,
214  struct sctphdr *, struct sctp_inpcb *,
215  struct mbuf *,
216 #if defined(__FreeBSD__)
218 #endif
219  uint32_t, uint16_t);
220 
221 int sctp_connectx_helper_add(struct sctp_tcb *stcb, struct sockaddr *addr,
222  int totaddr, int *error);
223 
224 struct sctp_tcb *
225 sctp_connectx_helper_find(struct sctp_inpcb *inp, struct sockaddr *addr,
226  unsigned int *totaddr, unsigned int *num_v4, unsigned int *num_v6,
227  int *error, unsigned int limit, int *bad_addr);
228 
229 int sctp_is_there_an_abort_here(struct mbuf *, int, uint32_t *);
230 #ifdef INET6
231 uint32_t sctp_is_same_scope(struct sockaddr_in6 *, struct sockaddr_in6 *);
232 
233 #if defined(SCTP_EMBEDDED_V6_SCOPE)
234 struct sockaddr_in6 *
235 sctp_recover_scope(struct sockaddr_in6 *, struct sockaddr_in6 *);
236 
237 #ifdef SCTP_KAME
238 #define sctp_recover_scope_mac(addr, store) do { \
239  if ((addr->sin6_family == AF_INET6) && \
240  (IN6_IS_SCOPE_LINKLOCAL(&addr->sin6_addr))) { \
241  *store = *addr; \
242  if (addr->sin6_scope_id == 0) { \
243  if (!sa6_recoverscope(store)) { \
244  addr = store; \
245  } \
246  } else { \
247  in6_clearscope(&addr->sin6_addr); \
248  addr = store; \
249  } \
250  } \
251 } while (0)
252 #else
253 #define sctp_recover_scope_mac(addr, store) do { \
254  if ((addr->sin6_family == AF_INET6) && \
255  (IN6_IS_SCOPE_LINKLOCAL(&addr->sin6_addr))) { \
256  *store = *addr; \
257  if (addr->sin6_scope_id == 0) { \
258  if (!in6_recoverscope(store, &store->sin6_addr, \
259  NULL)) { \
260  addr = store; \
261  } \
262  } else { \
263  in6_clearscope(&addr->sin6_addr); \
264  addr = store; \
265  } \
266  } \
267 } while (0)
268 #endif
269 #endif
270 #endif
271 
272 int sctp_cmpaddr(struct sockaddr *, struct sockaddr *);
273 
274 void sctp_print_address(struct sockaddr *);
275 
276 int
278  uint8_t, int
279 #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING)
281 #endif
282 );
283 
284 struct mbuf *sctp_generate_cause(uint16_t, char *);
286 
287 void sctp_bindx_add_address(struct socket *so, struct sctp_inpcb *inp,
288  struct sockaddr *sa, sctp_assoc_t assoc_id,
289  uint32_t vrf_id, int *error, void *p);
290 void sctp_bindx_delete_address(struct sctp_inpcb *inp,
291  struct sockaddr *sa, sctp_assoc_t assoc_id,
292  uint32_t vrf_id, int *error);
293 
294 int sctp_local_addr_count(struct sctp_tcb *stcb);
295 
296 #ifdef SCTP_MBCNT_LOGGING
297 void
298 sctp_free_bufspace(struct sctp_tcb *, struct sctp_association *,
299  struct sctp_tmit_chunk *, int);
300 
301 #else
302 #define sctp_free_bufspace(stcb, asoc, tp1, chk_cnt) \
303 do { \
304  if (tp1->data != NULL) { \
305  atomic_subtract_int(&((asoc)->chunks_on_out_queue), chk_cnt); \
306  if ((asoc)->total_output_queue_size >= tp1->book_size) { \
307  atomic_subtract_int(&((asoc)->total_output_queue_size), tp1->book_size); \
308  } else { \
309  (asoc)->total_output_queue_size = 0; \
310  } \
311  if (stcb->sctp_socket && ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || \
312  (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL))) { \
313  if (stcb->sctp_socket->so_snd.sb_cc >= tp1->book_size) { \
314  atomic_subtract_int(&((stcb)->sctp_socket->so_snd.sb_cc), tp1->book_size); \
315  } else { \
316  stcb->sctp_socket->so_snd.sb_cc = 0; \
317  } \
318  } \
319  } \
320 } while (0)
321 
322 #endif
323 
324 #define sctp_free_spbufspace(stcb, asoc, sp) \
325 do { \
326  if (sp->data != NULL) { \
327  if ((asoc)->total_output_queue_size >= sp->length) { \
328  atomic_subtract_int(&(asoc)->total_output_queue_size, sp->length); \
329  } else { \
330  (asoc)->total_output_queue_size = 0; \
331  } \
332  if (stcb->sctp_socket && ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || \
333  (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL))) { \
334  if (stcb->sctp_socket->so_snd.sb_cc >= sp->length) { \
335  atomic_subtract_int(&stcb->sctp_socket->so_snd.sb_cc,sp->length); \
336  } else { \
337  stcb->sctp_socket->so_snd.sb_cc = 0; \
338  } \
339  } \
340  } \
341 } while (0)
342 
343 #define sctp_snd_sb_alloc(stcb, sz) \
344 do { \
345  atomic_add_int(&stcb->asoc.total_output_queue_size,sz); \
346  if ((stcb->sctp_socket != NULL) && \
347  ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || \
348  (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL))) { \
349  atomic_add_int(&stcb->sctp_socket->so_snd.sb_cc,sz); \
350  } \
351 } while (0)
352 
353 /* functions to start/stop udp tunneling */
354 #if defined(__APPLE__) || defined(__FreeBSD__)
355 void sctp_over_udp_stop(void);
356 int sctp_over_udp_start(void);
357 #endif
358 #if defined(__Windows__)
359 void sctp_over_udp_restart(void);
360 #endif
361 
362 int
363 sctp_soreceive(struct socket *so, struct sockaddr **psa,
364  struct uio *uio,
365  struct mbuf **mp0,
366  struct mbuf **controlp,
367  int *flagsp);
368 
369 void
371 
372 void
373 sctp_wakeup_log(struct sctp_tcb *stcb,
374  uint32_t wake_cnt, int from);
375 
376 void sctp_log_strm_del_alt(struct sctp_tcb *stcb, uint32_t, uint16_t, uint16_t, int);
377 
378 void sctp_log_nagle_event(struct sctp_tcb *stcb, int action);
379 
380 
381 #ifdef SCTP_MBUF_LOGGING
382 void
383 sctp_log_mb(struct mbuf *m, int from);
384 
385 void
386 sctp_log_mbc(struct mbuf *m, int from);
387 #endif
388 
389 void
390 sctp_sblog(struct sockbuf *sb,
391  struct sctp_tcb *stcb, int from, int incr);
392 
393 void
394 sctp_log_strm_del(struct sctp_queued_to_read *control,
395  struct sctp_queued_to_read *poschk,
396  int from);
397 void sctp_log_cwnd(struct sctp_tcb *stcb, struct sctp_nets *, int, uint8_t);
398 void rto_logging(struct sctp_nets *net, int from);
399 
400 void sctp_log_closing(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int16_t loc);
401 
402 void sctp_log_lock(struct sctp_inpcb *inp, struct sctp_tcb *stcb, uint8_t from);
403 void sctp_log_maxburst(struct sctp_tcb *stcb, struct sctp_nets *, int, int, uint8_t);
404 void sctp_log_block(uint8_t, struct sctp_association *, size_t);
407 int sctp_fill_stat_log(void *, size_t *);
411 void sctp_print_mapping_array(struct sctp_association *asoc);
412 void sctp_clr_stat_log(void);
413 
414 
415 #ifdef SCTP_AUDITING_ENABLED
416 void
417 sctp_auditing(int, struct sctp_inpcb *, struct sctp_tcb *,
418  struct sctp_nets *);
419 void sctp_audit_log(uint8_t, uint8_t);
420 
421 #endif
422 #endif /* _KERNEL */
423 #endif
void sctp_notify_stream_reset_tsn(struct sctp_tcb *stcb, uint32_t sending_tsn, uint32_t recv_tsn, int flag)
Definition: sctputil.c:3607
int sctp_init_asoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, uint32_t override_tag, uint32_t vrf_id, uint16_t o_strms)
Definition: sctputil.c:1010
void sctp_handle_ootb(struct mbuf *m, int iphlen, int offset, struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_inpcb *inp, struct mbuf *cause, uint32_t vrf_id, uint16_t port)
Definition: sctputil.c:4335
caddr_t sctp_m_getptr(struct mbuf *m, int off, int len, uint8_t *in_ptr)
Definition: sctputil.c:2687
DOMString p
Definition: WebCryptoAPI.idl:116
struct mbuf * sctp_pad_lastmbuf(struct mbuf *m, int padval, struct mbuf *last_mbuf)
Definition: sctputil.c:2772
uint32_t flag
Definition: ssl_lib.c:2732
void sctp_bindx_delete_address(struct sctp_inpcb *inp, struct sockaddr *sa, sctp_assoc_t assoc_id, uint32_t vrf_id, int *error)
Definition: sctputil.c:7346
void sctp_misc_ints(uint8_t from, uint32_t a, uint32_t b, uint32_t c, uint32_t d)
Definition: sctputil.c:515
int c
Definition: cpp_unittests.cpp:275
Definition: sctp_structs.h:305
GLuint GLuint end
Definition: gl2ext.h:323
void sctp_timeout_handler(void *t)
Definition: sctputil.c:1597
Definition: sctp_header.h:315
signed int int32_t
Definition: ptypes.h:101
Definition: sctp_pcb.h:444
unsigned int uint32_t
Definition: ptypes.h:105
uint32_t sctp_select_a_tag(struct sctp_inpcb *inp, uint16_t lport, uint16_t rport, int check)
Definition: sctputil.c:945
int sctp_expand_mapping_array(struct sctp_association *asoc, uint32_t needed)
Definition: sctputil.c:1316
void sctp_log_maxburst(struct sctp_tcb *stcb, struct sctp_nets *net, int error, int burst, uint8_t from)
Definition: sctputil.c:424
int sctp_fill_stat_log(void *optval SCTP_UNUSED, size_t *optsize SCTP_UNUSED)
Definition: sctputil.c:597
void sctp_abort_association(struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct mbuf *m, int iphlen, struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct mbuf *op_err, uint32_t vrf_id, uint16_t port)
Definition: sctputil.c:4145
const GLfloat * m
Definition: gl2ext.h:850
action
Definition: CodeGeneratorReplayInputs.py:1042
Definition: user_socketvar.h:125
int sctp_dynamic_set_primary(struct sockaddr *sa, uint32_t vrf_id)
Definition: sctputil.c:6738
void sctp_add_to_readq(struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_queued_to_read *control, struct sockbuf *sb, int end, int inp_read_lock_held, int so_locked SCTP_UNUSED)
Definition: sctputil.c:4900
signed short int16_t
Definition: ptypes.h:93
struct sctp_ifa * sctp_find_ifa_in_ep(struct sctp_inpcb *inp, struct sockaddr *addr, int holds_lock)
Definition: sctputil.c:5348
uint32_t sctp_select_initial_TSN(struct sctp_pcb *inp)
Definition: sctputil.c:907
Definition: sctp.h:79
void sctp_abort_notification(struct sctp_tcb *stcb, uint8_t from_peer, uint16_t error, struct sctp_abort_chunk *abort, int so_locked SCTP_UNUSED)
Definition: sctputil.c:4108
Definition: sctp_structs.h:514
struct mbuf * sctp_generate_cause(uint16_t code, char *info)
Definition: sctputil.c:5016
int sctp_release_pr_sctp_chunk(struct sctp_tcb *stcb, struct sctp_tmit_chunk *tp1, uint8_t sent, int so_locked SCTP_UNUSED)
Definition: sctputil.c:5097
void sctp_wakeup_the_read_socket(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int so_locked SCTP_UNUSED)
Definition: sctputil.c:4758
void sctp_wakeup_log(struct sctp_tcb *stcb, uint32_t wake_cnt, int from)
Definition: sctputil.c:526
void sctp_log_map(uint32_t map, uint32_t cum, uint32_t high, int from)
Definition: sctputil.c:219
void sctp_abort_an_association(struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct mbuf *op_err, int so_locked SCTP_UNUSED)
Definition: sctputil.c:4257
OPENSSL_EXPORT X509_EXTENSION int loc
Definition: x509.h:996
#define SCTP_UNUSED
Definition: sctp_os_userspace.h:807
struct mbuf * sctp_generate_no_user_data_cause(uint32_t tsn)
Definition: sctputil.c:5043
Definition: sctp.h:58
Definition: quicdatachannel.h:29
uint32_t vrf_id
Definition: sctp_pcb.h:115
endif
Definition: downloads.php:90
unsigned char uint8_t
Definition: ptypes.h:89
uint32_t sctp_get_ifa_hash_val(struct sockaddr *addr)
Definition: sctputil.c:5408
struct sctp_paramhdr * sctp_get_next_param(struct mbuf *m, int offset, struct sctp_paramhdr *pull, int pull_limit)
Definition: sctputil.c:2729
unsigned short uint16_t
Definition: ptypes.h:97
Definition: EncryptedMediaExtensions.idl:80
uint32_t sctp_get_prev_mtu(uint32_t val)
Definition: sctputil.c:854
void sctp_timer_stop(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *net, uint32_t from)
Definition: sctputil.c:2360
struct mbuf * sctp_add_pad_tombuf(struct mbuf *m, int padlen)
Definition: sctputil.c:2741
Definition: sctp_structs.h:848
void sctp_log_nagle_event(struct sctp_tcb *stcb, int action)
Definition: sctputil.c:177
int sctp_connectx_helper_add(struct sctp_tcb *stcb, struct sockaddr *addr, int totaddr, int *error)
Definition: sctputil.c:7008
Definition: sctp_pcb.h:352
GLboolean GLboolean GLboolean GLboolean a
Definition: gl2ext.h:306
uint32_t sctp_calculate_len(struct mbuf *m)
Definition: sctputil.c:2517
Definition: sctp_pcb.h:614
short sb[N]
Definition: gcc-loops.cpp:21
Definition: user_mbuf.h:231
void sctp_mtu_size_reset(struct sctp_inpcb *inp, struct sctp_association *asoc, uint32_t mtu)
Definition: sctputil.c:2531
void sctp_log_block(uint8_t from, struct sctp_association *asoc, size_t sendlen)
Definition: sctputil.c:574
Definition: user_socketvar.h:85
GLfloat f
Definition: gl2.h:417
void sctp_timer_start(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *net)
Definition: sctputil.c:2067
short sa[N]
Definition: gcc-loops.cpp:20
Definition: sctp_pcb.h:103
void sctp_print_mapping_array(struct sctp_association *asoc)
Definition: sctputil.c:1281
void sctp_print_address(struct sockaddr *sa)
Definition: sctputil.c:4589
str
Definition: make-dist.py:305
void sctp_bindx_add_address(struct socket *so, struct sctp_inpcb *inp, struct sockaddr *sa, sctp_assoc_t assoc_id, uint32_t vrf_id, int *error, void *p)
Definition: sctputil.c:7191
int sctp_is_there_an_abort_here(struct mbuf *m, int iphlen, uint32_t *vtagfill)
Definition: sctputil.c:4417
int sctp_local_addr_count(struct sctp_tcb *stcb)
Definition: sctputil.c:7455
void sctp_log_cwnd(struct sctp_tcb *stcb, struct sctp_nets *net, int augment, uint8_t from)
Definition: sctputil.c:333
uint32_t sctp_calculate_rto(struct sctp_tcb *stcb, struct sctp_association *asoc, struct sctp_nets *net, struct timeval *told, int safe, int rtt_from_sack)
Definition: sctputil.c:2568
void sctp_stop_timers_for_shutdown(struct sctp_tcb *stcb)
Definition: sctputil.c:806
uint32_t sctp_get_next_mtu(uint32_t val)
Definition: sctputil.c:874
void sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb, uint32_t error, void *data, int so_locked SCTP_UNUSED)
Definition: sctputil.c:3783
void sctp_fill_random_store(struct sctp_pcb *m)
Definition: sctputil.c:888
DOMString e
Definition: WebCryptoAPI.idl:115
void sctp_log_sack(uint32_t old_cumack, uint32_t cumack, uint32_t tsn, uint16_t gaps, uint16_t dups, int from)
Definition: sctputil.c:198
void sctp_report_all_outbound(struct sctp_tcb *stcb, uint16_t error, int holds_lock, int so_locked SCTP_UNUSED)
Definition: sctputil.c:3989
void sctp_notify_stream_reset_add(struct sctp_tcb *stcb, uint16_t numberin, uint16_t numberout, int flag)
Definition: sctputil.c:3551
GLboolean GLboolean GLboolean b
Definition: gl2ext.h:306
struct sctp_ifa * sctp_find_ifa_by_addr(struct sockaddr *addr, uint32_t vrf_id, int holds_lock)
Definition: sctputil.c:5460
struct sctp_tcb * sctp_connectx_helper_find(struct sctp_inpcb *inp, struct sockaddr *addr, unsigned int *totaddr, unsigned int *num_v4, unsigned int *num_v6, int *error, unsigned int limit, int *bad_addr)
Definition: sctputil.c:7105
void rto_logging(struct sctp_nets *net, int from)
Definition: sctputil.c:136
uint32_t sctp_assoc_t
Definition: sctp_uio.h:65
void sctp_log_lock(struct sctp_inpcb *inp, struct sctp_tcb *stcb, uint8_t from)
Definition: sctputil.c:371
void sctp_log_strm_del(struct sctp_queued_to_read *control, struct sctp_queued_to_read *poschk, int from)
Definition: sctputil.c:302
void sctp_log_closing(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int16_t loc)
Definition: sctputil.c:110
void sctp_pull_off_control_to_new_inp(struct sctp_inpcb *old_inp, struct sctp_inpcb *new_inp, struct sctp_tcb *stcb, int waitflags)
Definition: sctputil.c:4662
void sctp_sblog(struct sockbuf *sb, struct sctp_tcb *stcb, int from, int incr)
Definition: sctputil.c:87
void sctp_log_rwnd_set(uint8_t from, uint32_t peers_rwnd, uint32_t flight_size, uint32_t overhead, uint32_t a_rwndval)
Definition: sctputil.c:473
void sctp_iterator_worker(void)
Definition: sctputil.c:1507
int32_t sctp_map_assoc_state(int kernel_state)
Definition: sctputil.c:967
int sctp_soreceive(struct socket *so, struct sockaddr **psa, struct uio *uio, struct mbuf **mp0, struct mbuf **controlp, int *flagsp)
Definition: sctputil.c:6788
#define d
Definition: float-mm.c:30
int sctp_cmpaddr(struct sockaddr *sa1, struct sockaddr *sa2)
Definition: sctputil.c:4537
void sctp_log_rwnd(uint8_t from, uint32_t peers_rwnd, uint32_t snd_size, uint32_t overhead)
Definition: sctputil.c:453
void sctp_log_fr(uint32_t biggest_tsn, uint32_t biggest_new_tsn, uint32_t tsn, int from)
Definition: sctputil.c:239
void sctp_log_strm_del_alt(struct sctp_tcb *stcb, uint32_t tsn, uint16_t sseq, uint16_t stream, int from)
Definition: sctputil.c:155
Definition: sctp_structs.h:487