webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
sctp_pcb.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/sctp_pcb.h 298942 2016-05-02 20:56:11Z pfg $");
36 #endif
37 
38 #ifndef _NETINET_SCTP_PCB_H_
39 #define _NETINET_SCTP_PCB_H_
40 
41 #include <netinet/sctp_os.h>
42 #include <netinet/sctp.h>
43 #include <netinet/sctp_constants.h>
44 #include <netinet/sctp_sysctl.h>
45 
46 LIST_HEAD(sctppcbhead, sctp_inpcb);
47 LIST_HEAD(sctpasochead, sctp_tcb);
48 LIST_HEAD(sctpladdr, sctp_laddr);
49 LIST_HEAD(sctpvtaghead, sctp_tagblock);
50 LIST_HEAD(sctp_vrflist, sctp_vrf);
51 LIST_HEAD(sctp_ifnlist, sctp_ifn);
52 LIST_HEAD(sctp_ifalist, sctp_ifa);
53 TAILQ_HEAD(sctp_readhead, sctp_queued_to_read);
54 TAILQ_HEAD(sctp_streamhead, sctp_stream_queue_pending);
55 
56 #include <netinet/sctp_structs.h>
57 #include <netinet/sctp_auth.h>
58 
59 #define SCTP_PCBHASH_ALLADDR(port, mask) (port & mask)
60 #define SCTP_PCBHASH_ASOC(tag, mask) (tag & mask)
61 
62 struct sctp_vrf {
63  LIST_ENTRY (sctp_vrf) next_vrf;
64  struct sctp_ifalist *vrf_addr_hash;
65  struct sctp_ifnlist ifnlist;
67  uint32_t tbl_id_v4; /* default v4 table id */
68  uint32_t tbl_id_v6; /* default v6 table id */
72 };
73 
74 struct sctp_ifn {
75  struct sctp_ifalist ifalist;
76  struct sctp_vrf *vrf;
77  LIST_ENTRY(sctp_ifn) next_ifn;
78  LIST_ENTRY(sctp_ifn) next_bucket;
79  void *ifn_p; /* never access without appropriate lock */
82  uint32_t ifn_index; /* shorthand way to look at ifn for reference */
83  uint32_t refcount; /* number of reference held should be >= ifa_count */
84  uint32_t ifa_count; /* IFA's we hold (in our list - ifalist)*/
85  uint32_t num_v6; /* number of v6 addresses */
86  uint32_t num_v4; /* number of v4 addresses */
87  uint32_t registered_af; /* registered address family for i/f events */
88  char ifn_name[SCTP_IFNAMSIZ];
89 };
90 
91 /* SCTP local IFA flags */
92 #define SCTP_ADDR_VALID 0x00000001 /* its up and active */
93 #define SCTP_BEING_DELETED 0x00000002 /* being deleted,
94  * when refcount = 0. Note
95  * that it is pulled from the ifn list
96  * and ifa_p is nulled right away but
97  * it cannot be freed until the last *net
98  * pointing to it is deleted.
99  */
100 #define SCTP_ADDR_DEFER_USE 0x00000004 /* Hold off using this one */
101 #define SCTP_ADDR_IFA_UNUSEABLE 0x00000008
102 
103 struct sctp_ifa {
104  LIST_ENTRY(sctp_ifa) next_ifa;
105  LIST_ENTRY(sctp_ifa) next_bucket;
106  struct sctp_ifn *ifn_p; /* back pointer to parent ifn */
107  void *ifa; /* pointer to ifa, needed for flag
108  * update for that we MUST lock
109  * appropriate locks. This is for V6.
110  */
111  union sctp_sockstore address;
112  uint32_t refcount; /* number of folks referring to this */
115  uint32_t vrf_id; /* vrf_id of this addr (for deleting) */
120 };
121 
122 struct sctp_laddr {
123  LIST_ENTRY(sctp_laddr) sctp_nxt_addr; /* next in list */
124  struct sctp_ifa *ifa;
125  uint32_t action; /* Used during asconf and adding
126  * if no-zero src-addr selection will
127  * not consider this address.
128  */
129  struct timeval start_time; /* time when this address was created */
130 };
131 
133  int error;
134 };
135 
137  uint32_t tv_sec_at_expire; /* the seconds from boot to expire */
138  uint32_t v_tag; /* the vtag that can not be reused */
139  uint16_t lport; /* the local port used in vtag */
140  uint16_t rport; /* the remote port used in vtag */
141 };
142 
144  LIST_ENTRY(sctp_tagblock) sctp_nxt_tagblock;
146 };
147 
148 
149 struct sctp_epinfo {
150 #if defined(__FreeBSD__)
151 #ifdef INET
152  struct socket *udp4_tun_socket;
153 #endif
154 #ifdef INET6
155  struct socket *udp6_tun_socket;
156 #endif
157 #endif
158  struct sctpasochead *sctp_asochash;
159  u_long hashasocmark;
160 
161  struct sctppcbhead *sctp_ephash;
162  u_long hashmark;
163 
164  /*-
165  * The TCP model represents a substantial overhead in that we get an
166  * additional hash table to keep explicit connections in. The
167  * listening TCP endpoint will exist in the usual ephash above and
168  * accept only INIT's. It will be incapable of sending off an INIT.
169  * When a dg arrives we must look in the normal ephash. If we find a
170  * TCP endpoint that will tell us to go to the specific endpoint
171  * hash and re-hash to find the right assoc/socket. If we find a UDP
172  * model socket we then must complete the lookup. If this fails,
173  * i.e. no association can be found then we must continue to see if
174  * a sctp_peeloff()'d socket is in the tcpephash (a spun off socket
175  * acts like a TCP model connected socket).
176  */
177  struct sctppcbhead *sctp_tcpephash;
178  u_long hashtcpmark;
180 
181  struct sctp_vrflist *sctp_vrfhash;
182  u_long hashvrfmark;
183 
184  struct sctp_ifnlist *vrf_ifn_hash;
186 
187  struct sctppcbhead listhead;
188  struct sctpladdr addr_wq;
189 
190 #if defined(__APPLE__)
191  struct inpcbhead inplisthead;
192  struct inpcbinfo sctbinfo;
193 #endif
194  /* ep zone info */
204 
205 #if defined(__FreeBSD__) && __FreeBSD_version >= 503000
206 #if __FreeBSD_version <= 602000
207  struct mtx ipi_ep_mtx;
208 #else
209  struct rwlock ipi_ep_mtx;
210 #endif
211  struct mtx ipi_iterator_wq_mtx;
212 #if __FreeBSD_version <= 602000
213  struct mtx ipi_addr_mtx;
214 #else
215  struct rwlock ipi_addr_mtx;
216 #endif
217  struct mtx ipi_pktlog_mtx;
218  struct mtx wq_addr_mtx;
219 #elif defined(SCTP_PROCESS_LEVEL_LOCKS)
220  userland_mutex_t ipi_ep_mtx;
221  userland_mutex_t ipi_addr_mtx;
222  userland_mutex_t ipi_count_mtx;
223  userland_mutex_t ipi_pktlog_mtx;
224  userland_mutex_t wq_addr_mtx;
225 #elif defined(__APPLE__)
226 #ifdef _KERN_LOCKS_H_
227  lck_mtx_t *ipi_addr_mtx;
228  lck_mtx_t *ipi_count_mtx;
229  lck_mtx_t *ipi_pktlog_mtx;
230  lck_mtx_t *logging_mtx;
231  lck_mtx_t *wq_addr_mtx;
232 #else
233  void *ipi_count_mtx;
234  void *logging_mtx;
235 #endif /* _KERN_LOCKS_H_ */
236 #elif defined(__Windows__)
237  struct rwlock ipi_ep_lock;
238  struct rwlock ipi_addr_lock;
239  struct spinlock ipi_pktlog_mtx;
240  struct rwlock wq_addr_mtx;
241 #elif defined(__Userspace__)
242  /* TODO decide on __Userspace__ locks */
243 #endif
245 
246  /* assoc/tcb zone info */
248 
249  /* local addrlist zone info */
251 
252  /* remote addrlist zone info */
254 
255  /* chunk structure list for output */
257 
258  /* socket queue zone info */
260 
261  /* socket queue zone info */
263 
264  /* Number of vrfs */
266 
267  /* Number of ifns */
269 
270  /* Number of ifas */
272 
273  /* system wide number of free chunks hanging around */
276 
277  struct sctpvtaghead vtag_timewait[SCTP_STACK_VTAG_HASH_SIZE];
278 
279  /* address work queue handling */
280  struct sctp_timer addr_wq_timer;
281 
282 #if defined(_SCTP_NEEDS_CALLOUT_) || defined(_USER_SCTP_NEEDS_CALLOUT_)
283  struct calloutlist callqueue;
284 #endif
285 };
286 
287 
289  /* All static structures that
290  * anchor the system must be here.
291  */
292  struct sctp_epinfo sctppcbinfo;
293 #if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT)
294  struct sctpstat *sctpstat;
295 #else
296  struct sctpstat sctpstat;
297 #endif
298  struct sctp_sysctl sctpsysctl;
301 #if defined(SCTP_PACKET_LOGGING)
302  int packet_log_writers;
303  int packet_log_end;
304  uint8_t packet_log_buffer[SCTP_PACKET_LOG_SIZE];
305 #endif
306 #if defined(__APPLE__)
307  int sctp_main_timer_ticks;
308 #endif
309 #if defined(__Userspace__)
310  userland_mutex_t timer_mtx;
311  userland_thread_t timer_thread;
312  uint8_t timer_thread_should_exit;
313 #if !defined(__Userspace_os_Windows)
314  pthread_mutexattr_t mtx_attr;
315 #if defined(INET) || defined(INET6)
316  int userspace_route;
317  userland_thread_t recvthreadroute;
318 #endif
319 #endif
320 #ifdef INET
321 #if defined(__Userspace_os_Windows)
322  SOCKET userspace_rawsctp;
323  SOCKET userspace_udpsctp;
324 #else
325  int userspace_rawsctp;
326  int userspace_udpsctp;
327 #endif
328  userland_thread_t recvthreadraw;
329  userland_thread_t recvthreadudp;
330 #endif
331 #ifdef INET6
332 #if defined(__Userspace_os_Windows)
333  SOCKET userspace_rawsctp6;
334  SOCKET userspace_udpsctp6;
335 #else
336  int userspace_rawsctp6;
337  int userspace_udpsctp6;
338 #endif
339  userland_thread_t recvthreadraw6;
340  userland_thread_t recvthreadudp6;
341 #endif
342  int (*conn_output)(void *addr, void *buffer, size_t length, uint8_t tos, uint8_t set_df);
343  void (*debug_printf)(const char *format, ...);
344 #endif
345 };
346 
347 /*-
348  * Here we have all the relevant information for each SCTP entity created. We
349  * will need to modify this as approprate. We also need to figure out how to
350  * access /dev/random.
351  */
352 struct sctp_pcb {
353  unsigned int time_of_secret_change; /* number of seconds from
354  * timeval.tv_sec */
356  unsigned int size_of_a_cookie;
357 
358  unsigned int sctp_timeoutticks[SCTP_NUM_TMRS];
359  unsigned int sctp_minrto;
360  unsigned int sctp_maxrto;
361  unsigned int initial_rto;
363 
364  unsigned int sctp_sack_freq;
367 
370  /* authentication related fields */
371  struct sctp_keyhead shared_keys;
375 
376  /* various thresholds */
377  /* Max times I will init at a guy */
379 
380  /* Max times I will send before we consider someone dead */
382 
384 
386 
387  /* number of streams to pre-open on a association */
390 
391  /* random number generator */
395 
396  /*
397  * This timer is kept running per endpoint. When it fires it will
398  * change the secret key. The default is once a hour
399  */
400  struct sctp_timer signature_change;
401 
402  /* Zero copy full buffer timer */
403  struct sctp_timer zero_copy_timer;
404  /* Zero copy app to transport (sendq) read repulse timer */
405  struct sctp_timer zero_copy_sendq_timer;
407  /* defaults to 0 */
415 #ifdef INET6
416  uint32_t default_flowlabel;
417 #endif
421  uint16_t port; /* remote UDP encapsulation port */
422 };
423 
424 #ifndef SCTP_ALIGNMENT
425 #define SCTP_ALIGNMENT 32
426 #endif
427 
428 #ifndef SCTP_ALIGNM1
429 #define SCTP_ALIGNM1 (SCTP_ALIGNMENT-1)
430 #endif
431 
432 #define sctp_lport ip_inp.inp.inp_lport
433 
440 };
441 #define SCTP_READ_LOG_SIZE 135 /* we choose the number to make a pcb a page */
442 
443 
444 struct sctp_inpcb {
445  /*-
446  * put an inpcb in front of it all, kind of a waste but we need to
447  * for compatibility with all the other stuff.
448  */
449  union {
450  struct inpcb inp;
451  char align[(sizeof(struct in6pcb) + SCTP_ALIGNM1) &
453  } ip_inp;
454 
455 #if defined(__APPLE__)
456  /* leave some space in case i386 inpcb is bigger than ppc */
457  uint8_t padding[128];
458 #endif
459 
460  /* Socket buffer lock protects read_queue and of course sb_cc */
461  struct sctp_readhead read_queue;
462 
463  LIST_ENTRY(sctp_inpcb) sctp_list; /* lists all endpoints */
464  /* hash of all endpoints for model */
465  LIST_ENTRY(sctp_inpcb) sctp_hash;
466  /* count of local addresses bound, 0 if bound all */
468 
469  /* list of addrs in use by the EP, NULL if bound-all */
470  struct sctpladdr sctp_addr_list;
471  /* used for source address selection rotation when we are subset bound */
473 
474  /* back pointer to our socket */
476  uint64_t sctp_features; /* Feature flags */
477  uint32_t sctp_flags; /* INP state flag set */
478  uint32_t sctp_mobility_features; /* Mobility Feature flags */
479  struct sctp_pcb sctp_ep;/* SCTP ep data */
480  /* head of the hash of all associations */
481  struct sctpasochead *sctp_tcbhash;
483  /* head of the list of all associations */
484  struct sctpasochead sctp_asoc_list;
485 #ifdef SCTP_TRACK_FREED_ASOCS
486  struct sctpasochead sctp_asoc_free_list;
487 #endif
503  struct sctp_nonpad_sndrcvinfo def_send;
504  /*-
505  * These three are here for the sosend_dgram
506  * (pkt, pkt_last and control).
507  * routine. However, I don't think anyone in
508  * the current FreeBSD kernel calls this. So
509  * they are candidates with sctp_sendm for
510  * de-supporting.
511  */
512 #ifdef __Panda__
513  pakhandle_type pak_to_read;
514  pakhandle_type pak_to_read_sendq;
515 #endif
516  struct mbuf *pkt, *pkt_last;
517  struct mbuf *control;
518 #if !(defined(__FreeBSD__) || defined(__APPLE__) || defined(__Windows__) || defined(__Userspace__))
519 #ifndef INP_IPV6
520 #define INP_IPV6 0x1
521 #endif
522 #ifndef INP_IPV4
523 #define INP_IPV4 0x2
524 #endif
526  /* TODO __Userspace__ where is our inp_vlag going to be? */
528  uint8_t inp_ip_tos; /* defined as macro in user_inpcb.h */
530 #endif
531 #if defined(__FreeBSD__) && __FreeBSD_version >= 503000
532  struct mtx inp_mtx;
533  struct mtx inp_create_mtx;
534  struct mtx inp_rdata_mtx;
536 #elif defined(SCTP_PROCESS_LEVEL_LOCKS)
537  userland_mutex_t inp_mtx;
538  userland_mutex_t inp_create_mtx;
539  userland_mutex_t inp_rdata_mtx;
541 #elif defined(__APPLE__)
542 #if defined(SCTP_APPLE_RWLOCK)
543  lck_rw_t *inp_mtx;
544 #else
545  lck_mtx_t *inp_mtx;
546 #endif
547  lck_mtx_t *inp_create_mtx;
548  lck_mtx_t *inp_rdata_mtx;
549 #elif defined(__Windows__)
550  struct rwlock inp_lock;
551  struct spinlock inp_create_lock;
552  struct spinlock inp_rdata_lock;
554 #elif defined(__Userspace__)
555  /* TODO decide on __Userspace__ locks */
557 #endif
558 #if defined(__APPLE__)
560 
561  uint32_t lock_caller1;
562  uint32_t lock_caller2;
563  uint32_t lock_caller3;
564  uint32_t unlock_caller1;
565  uint32_t unlock_caller2;
566  uint32_t unlock_caller3;
567  uint32_t getlock_caller1;
568  uint32_t getlock_caller2;
569  uint32_t getlock_caller3;
570  uint32_t gen_count;
571  uint32_t lock_gen_count;
572  uint32_t unlock_gen_count;
573  uint32_t getlock_gen_count;
574 
575  uint32_t i_am_here_file;
576  uint32_t i_am_here_line;
577 #endif
580 #ifdef SCTP_MVRF
581  uint32_t *m_vrf_ids;
582  uint32_t num_vrfs;
583  uint32_t vrf_size;
584 #endif
589  struct sctpasochead *sctp_asocidhash;
592 
593 #ifdef SCTP_ASOCLOG_OF_TSNS
594  struct sctp_pcbtsn_rlog readlog[SCTP_READ_LOG_SIZE];
595  uint32_t readlog_index;
596 #endif
597 #if defined(__Userspace__)
598  void *ulp_info;
599  int (*recv_callback)(struct socket *, union sctp_sockstore, void *, size_t,
600  struct sctp_rcvinfo, int, void *);
601  uint32_t send_sb_threshold;
602  int (*send_callback)(struct socket *, uint32_t);
603 #endif
604 };
605 
606 #if defined(__Userspace__)
607 int register_recv_cb (struct socket *,
608  int (*)(struct socket *, union sctp_sockstore, void *, size_t,
609  struct sctp_rcvinfo, int, void *));
610 int register_send_cb (struct socket *, uint32_t, int (*)(struct socket *, uint32_t));
611 int register_ulp_info (struct socket *, void *);
612 
613 #endif
614 struct sctp_tcb {
615  struct socket *sctp_socket; /* back pointer to socket */
616  struct sctp_inpcb *sctp_ep; /* back pointer to ep */
617  LIST_ENTRY(sctp_tcb) sctp_tcbhash; /* next link in hash
618  * table */
619  LIST_ENTRY(sctp_tcb) sctp_tcblist; /* list of all of the
620  * TCB's */
621  LIST_ENTRY(sctp_tcb) sctp_tcbasocidhash; /* next link in asocid
622  * hash table
623  */
624  LIST_ENTRY(sctp_tcb) sctp_asocs; /* vtag hash list */
625  struct sctp_block_entry *block_entry; /* pointer locked by socket
626  * send buffer */
627  struct sctp_association asoc;
628  /*-
629  * freed_by_sorcv_sincelast is protected by the sockbuf_lock NOT the
630  * tcb_lock. Its special in this way to help avoid extra mutex calls
631  * in the reading of data.
632  */
637  uint16_t rport; /* remote port in network format */
639 #if defined(__FreeBSD__) && __FreeBSD_version >= 503000
640  struct mtx tcb_mtx;
641  struct mtx tcb_send_mtx;
642 #elif defined(SCTP_PROCESS_LEVEL_LOCKS)
643  userland_mutex_t tcb_mtx;
644  userland_mutex_t tcb_send_mtx;
645 #elif defined(__APPLE__)
646  lck_mtx_t* tcb_mtx;
647  lck_mtx_t* tcb_send_mtx;
648 #elif defined(__Windows__)
649  struct spinlock tcb_lock;
650  struct spinlock tcb_send_lock;
651 #elif defined(__Userspace__)
652  /* TODO decide on __Userspace__ locks */
653 #endif
654 #if defined(__APPLE__)
655  uint32_t caller1;
656  uint32_t caller2;
657  uint32_t caller3;
658 #endif
659 };
660 
661 
662 #if defined(__FreeBSD__) && __FreeBSD_version >= 503000
663 
664 #include <netinet/sctp_lock_bsd.h>
665 
666 #elif defined(__APPLE__)
667 /*
668  * Apple MacOS X 10.4 "Tiger"
669  */
670 
671 #include <netinet/sctp_lock_apple_fg.h>
672 
673 #elif defined(SCTP_PROCESS_LEVEL_LOCKS)
674 
676 
677 #elif defined(__Windows__)
678 
679 #include <netinet/sctp_lock_windows.h>
680 
681 #elif defined(__Userspace__)
682 
684 
685 #else
686 /*
687  * Pre-5.x FreeBSD, and others.
688  */
689 #include <netinet/sctp_lock_empty.h>
690 #endif
691 
692 /* TODO where to put non-_KERNEL things for __Userspace__? */
693 #if defined(_KERNEL) || defined(__Userspace__)
694 
695 /* Attention Julian, this is the extern that
696  * goes with the base info. sctp_pcb.c has
697  * the real definition.
698  */
699 #if defined(__FreeBSD__) && __FreeBSD_version >= 801000
700 VNET_DECLARE(struct sctp_base_info, system_base_info) ;
701 #else
702 extern struct sctp_base_info system_base_info;
703 #endif
704 
705 #ifdef INET6
706 int SCTP6_ARE_ADDR_EQUAL(struct sockaddr_in6 *a, struct sockaddr_in6 *b);
707 #endif
708 
709 void sctp_fill_pcbinfo(struct sctp_pcbinfo *);
710 
711 struct sctp_ifn *
712 sctp_find_ifn(void *ifn, uint32_t ifn_index);
713 
714 struct sctp_vrf *sctp_allocate_vrf(int vrfid);
715 struct sctp_vrf *sctp_find_vrf(uint32_t vrfid);
716 void sctp_free_vrf(struct sctp_vrf *vrf);
717 
718 /*-
719  * Change address state, can be used if
720  * O/S supports telling transports about
721  * changes to IFA/IFN's (link layer triggers).
722  * If a ifn goes down, we will do src-addr-selection
723  * and NOT use that, as a source address. This does
724  * not stop the routing system from routing out
725  * that interface, but we won't put it as a source.
726  */
727 void sctp_mark_ifa_addr_down(uint32_t vrf_id, struct sockaddr *addr, const char *if_name, uint32_t ifn_index);
728 void sctp_mark_ifa_addr_up(uint32_t vrf_id, struct sockaddr *addr, const char *if_name, uint32_t ifn_index);
729 
730 struct sctp_ifa *
732  void *ifn, uint32_t ifn_index, uint32_t ifn_type,
733  const char *if_name,
734  void *ifa, struct sockaddr *addr, uint32_t ifa_flags,
735  int dynamic_add);
736 
737 void sctp_update_ifn_mtu(uint32_t ifn_index, uint32_t mtu);
738 
739 void sctp_free_ifn(struct sctp_ifn *sctp_ifnp);
740 void sctp_free_ifa(struct sctp_ifa *sctp_ifap);
741 
742 
743 void sctp_del_addr_from_vrf(uint32_t vrfid, struct sockaddr *addr,
744  uint32_t ifn_index, const char *if_name);
745 
746 
747 
748 struct sctp_nets *sctp_findnet(struct sctp_tcb *, struct sockaddr *);
749 
750 struct sctp_inpcb *sctp_pcb_findep(struct sockaddr *, int, int, uint32_t);
751 
752 #if defined(__FreeBSD__) && __FreeBSD_version >= 500000
753 int sctp_inpcb_bind(struct socket *, struct sockaddr *,
754  struct sctp_ifa *,struct thread *);
755 #elif defined(__Windows__)
756 int sctp_inpcb_bind(struct socket *, struct sockaddr *,
757  struct sctp_ifa *,PKTHREAD);
758 #else
759 /* struct proc is a dummy for __Userspace__ */
760 int sctp_inpcb_bind(struct socket *, struct sockaddr *,
761  struct sctp_ifa *, struct proc *);
762 #endif
763 
764 struct sctp_tcb *
765 sctp_findassociation_addr(struct mbuf *, int,
766  struct sockaddr *, struct sockaddr *,
767  struct sctphdr *, struct sctp_chunkhdr *, struct sctp_inpcb **,
768  struct sctp_nets **, uint32_t vrf_id);
769 
770 struct sctp_tcb *
771 sctp_findassociation_addr_sa(struct sockaddr *,
772  struct sockaddr *, struct sctp_inpcb **, struct sctp_nets **, int, uint32_t);
773 
774 void
776  struct sctp_tcb *);
777 
778 /*-
779  * For this call ep_addr, the to is the destination endpoint address of the
780  * peer (relative to outbound). The from field is only used if the TCP model
781  * is enabled and helps distingush amongst the subset bound (non-boundall).
782  * The TCP model MAY change the actual ep field, this is why it is passed.
783  */
784 struct sctp_tcb *
786  struct sockaddr *, struct sctp_nets **, struct sockaddr *,
787  struct sctp_tcb *);
788 
789 struct sctp_tcb *
790 sctp_findasoc_ep_asocid_locked(struct sctp_inpcb *inp, sctp_assoc_t asoc_id, int want_lock);
791 
792 struct sctp_tcb *
794  sctp_assoc_t, int);
795 
796 struct sctp_tcb *
797 sctp_findassociation_ep_asconf(struct mbuf *, int, struct sockaddr *,
798  struct sctphdr *, struct sctp_inpcb **, struct sctp_nets **, uint32_t vrf_id);
799 
800 int sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id);
801 
802 int sctp_is_address_on_local_host(struct sockaddr *addr, uint32_t vrf_id);
803 
804 void sctp_inpcb_free(struct sctp_inpcb *, int, int);
805 
806 #if defined(__FreeBSD__) && __FreeBSD_version >= 500000
807 struct sctp_tcb *
808 sctp_aloc_assoc(struct sctp_inpcb *, struct sockaddr *,
809  int *, uint32_t, uint32_t, uint16_t, uint16_t, struct thread *);
810 #elif defined(__Windows__)
811 struct sctp_tcb *
812 sctp_aloc_assoc(struct sctp_inpcb *, struct sockaddr *,
813  int *, uint32_t, uint32_t, uint16_t, uint16_t, PKTHREAD);
814 #else
815 /* proc will be NULL for __Userspace__ */
816 struct sctp_tcb *
817 sctp_aloc_assoc(struct sctp_inpcb *, struct sockaddr *,
818  int *, uint32_t, uint32_t, uint16_t, uint16_t, struct proc *);
819 #endif
820 
821 int sctp_free_assoc(struct sctp_inpcb *, struct sctp_tcb *, int, int);
822 
823 
825 
827 
828 void
830 
831 void sctp_add_local_addr_ep(struct sctp_inpcb *, struct sctp_ifa *, uint32_t);
832 
833 void sctp_del_local_addr_ep(struct sctp_inpcb *, struct sctp_ifa *);
834 
835 int sctp_add_remote_addr(struct sctp_tcb *, struct sockaddr *, struct sctp_nets **, uint16_t, int, int);
836 
837 void sctp_remove_net(struct sctp_tcb *, struct sctp_nets *);
838 
839 int sctp_del_remote_addr(struct sctp_tcb *, struct sockaddr *);
840 
841 void sctp_pcb_init(void);
842 
843 void sctp_pcb_finish(void);
844 
845 void sctp_add_local_addr_restricted(struct sctp_tcb *, struct sctp_ifa *);
846 void sctp_del_local_addr_restricted(struct sctp_tcb *, struct sctp_ifa *);
847 
848 int
849 sctp_load_addresses_from_init(struct sctp_tcb *, struct mbuf *, int, int,
850  struct sockaddr *, struct sockaddr *, struct sockaddr *, uint16_t);
851 
852 int
853 sctp_set_primary_addr(struct sctp_tcb *, struct sockaddr *,
854  struct sctp_nets *);
855 
856 int sctp_is_vtag_good(uint32_t, uint16_t lport, uint16_t rport, struct timeval *);
857 
858 /* void sctp_drain(void); */
859 
860 int sctp_destination_is_reachable(struct sctp_tcb *, struct sockaddr *);
861 
862 int sctp_swap_inpcb_for_listen(struct sctp_inpcb *inp);
863 
864 void sctp_clean_up_stream(struct sctp_tcb *stcb, struct sctp_readhead *rh);
865 
866 /*-
867  * Null in last arg inpcb indicate run on ALL ep's. Specific inp in last arg
868  * indicates run on ONLY assoc's of the specified endpoint.
869  */
870 int
872  asoc_func af,
873  inp_func inpe,
875  uint32_t, void *,
876  uint32_t,
877  end_func ef,
878  struct sctp_inpcb *,
879  uint8_t co_off);
880 #if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP)
881 void
882 sctp_queue_to_mcore(struct mbuf *m, int off, int cpu_to_use);
883 
884 #endif
885 
886 #endif /* _KERNEL */
887 #endif /* !__sctp_pcb_h__ */
int sctp_is_in_timewait(uint32_t tag, uint16_t lport, uint16_t rport)
Definition: sctp_pcb.c:5316
int SOCKET
Definition: udp_socket_wrapper.h:27
sctp_auth_chklist_t * local_auth_chunks
Definition: sctp_pcb.h:372
char sctp_pcb_initialized
Definition: sctp_pcb.h:300
Definition: sctp_auth.h:82
void sctp_add_local_addr_restricted(struct sctp_tcb *stcb, struct sctp_ifa *ifa)
Definition: sctp_pcb.c:6349
thread
Definition: __init__.py:35
uint16_t resv
Definition: sctp_pcb.h:638
void sctp_add_local_addr_ep(struct sctp_inpcb *inp, struct sctp_ifa *ifa, uint32_t action)
Definition: sctp_pcb.c:6174
uint8_t local_strreset_support
Definition: sctp_pcb.h:493
void debug_printf(const char *format,...)
Definition: client.c:79
Definition: sctp_structs.h:574
int sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id)
Definition: sctp_pcb.c:2772
struct sctpasochead * sctp_asochash
Definition: sctp_pcb.h:158
uint32_t partial_delivery_point
Definition: sctp_pcb.h:490
LIST_HEAD(sctppcbhead, sctp_inpcb)
sctp_zone_t ipi_zone_readq
Definition: sctp_pcb.h:200
#define SCTP_IFNAMSIZ
Definition: sctp_os_userspace.h:665
void sctp_free_ifn(struct sctp_ifn *sctp_ifnp)
Definition: sctp_pcb.c:315
unsigned long long uint64_t
Definition: ptypes.h:120
uint16_t default_keyid
Definition: sctp_pcb.h:374
void sctp_pcb_init()
Definition: sctp_pcb.c:6635
uint16_t port
Definition: sctp_pcb.h:421
Definition: sctp_pcb.h:149
struct sctp_tcb * sctp_findasoc_ep_asocid_locked(struct sctp_inpcb *inp, sctp_assoc_t asoc_id, int want_lock)
Definition: sctp_pcb.c:1829
int error
Definition: sctp_pcb.h:133
#define SCTP_PACKET_LOG_SIZE
Definition: sctp.h:623
int sctp_add_remote_addr(struct sctp_tcb *stcb, struct sockaddr *newaddr, struct sctp_nets **netp, uint16_t port, int set_scope, int from)
Definition: sctp_pcb.c:4421
void sctp_update_ifn_mtu(uint32_t ifn_index, uint32_t mtu)
Definition: sctp_pcb.c:329
GLint GLint GLint GLsizei GLsizei GLenum format
Definition: gl2.h:403
uint32_t tbl_id_v6
Definition: sctp_pcb.h:68
struct sctp_ifn * sctp_find_ifn(void *ifn, uint32_t ifn_index)
Definition: sctp_pcb.c:261
int sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int from_inpcbfree, int from_location)
Definition: sctp_pcb.c:5465
int sctp_set_primary_addr(struct sctp_tcb *stcb, struct sockaddr *sa, struct sctp_nets *net)
Definition: sctp_pcb.c:7766
Definition: sctp_structs.h:305
uint32_t total_sends
Definition: sctp_pcb.h:585
struct sctp_vrf * vrf
Definition: sctp_pcb.h:76
uint16_t max_init_times
Definition: sctp_pcb.h:378
signed int int32_t
Definition: ptypes.h:101
uint32_t vrf_id
Definition: sctp_pcb.h:66
Definition: sctp_pcb.h:444
unsigned int uint32_t
Definition: ptypes.h:105
uint16_t strm
Definition: sctp_pcb.h:436
int sctp_initiate_iterator(inp_func inpf, asoc_func af, inp_func inpe, uint32_t pcb_state, uint32_t pcb_features, uint32_t asoc_state, void *argp, uint32_t argi, end_func ef, struct sctp_inpcb *s_inp, uint8_t chunk_output_off)
Definition: sctp_pcb.c:8105
uint64_t sctp_features
Definition: sctp_pcb.h:476
int laddr_count
Definition: sctp_pcb.h:467
uint32_t ipi_count_laddr
Definition: sctp_pcb.h:250
sctp_zone_t ipi_zone_ep
Definition: sctp_pcb.h:195
uint8_t idata_supported
Definition: sctp_pcb.h:498
uint16_t rport
Definition: sctp_pcb.h:637
uint32_t total_nospaces
Definition: sctp_pcb.h:588
Definition: xmlparse.c:181
void sctp_del_local_addr_restricted(struct sctp_tcb *stcb, struct sctp_ifa *ifa)
Definition: sctp_pcb.c:6384
void sctp_add_vtag_to_timewait(uint32_t tag, uint32_t time, uint16_t lport, uint16_t rport)
Definition: sctp_pcb.c:5343
struct sctp_ifn * ifn_p
Definition: sctp_pcb.h:106
uint32_t action
Definition: sctp_pcb.h:125
uint16_t seq
Definition: sctp_pcb.h:437
struct sctp_laddr * next_addr_touse
Definition: sctp_pcb.h:472
uint32_t tbl_id_v4
Definition: sctp_pcb.h:67
Definition: sctp_pcb.h:434
void sctp_free_vrf(struct sctp_vrf *vrf)
Definition: sctp_pcb.c:299
struct sctppcbhead * sctp_tcpephash
Definition: sctp_pcb.h:177
sctp_zone_t ipi_zone_asconf
Definition: sctp_pcb.h:202
uint32_t def_vrf_id
Definition: sctp_pcb.h:578
int sctp_is_address_on_local_host(struct sockaddr *addr, uint32_t vrf_id)
Definition: sctp_pcb.c:4400
uint32_t ipi_count_ep
Definition: sctp_pcb.h:244
uint32_t sctp_default_ss_module
Definition: sctp_pcb.h:369
uint32_t refcount
Definition: sctp_pcb.h:71
const GLfloat * m
Definition: gl2ext.h:850
uint8_t inp_ip_tos
Definition: sctp_pcb.h:528
uint8_t src_is_loop
Definition: sctp_pcb.h:116
uint32_t flags
Definition: sctp_pcb.h:113
int initial_init_rto_max
Definition: sctp_pcb.h:362
Definition: user_socketvar.h:125
uint32_t tv_sec_at_expire
Definition: sctp_pcb.h:137
uint32_t last_abort_code
Definition: sctp_pcb.h:587
uint8_t src_is_priv
Definition: sctp_pcb.h:117
std::integral_constant< std::uint32_t, V > uint32_t
Definition: Brigand.h:441
uint32_t ipi_count_ifas
Definition: sctp_pcb.h:271
char last_secret_number
Definition: sctp_pcb.h:420
Definition: user_inpcb.h:108
pthread_t userland_thread_t
Definition: sctp_os_userspace.h:282
std::integral_constant< std::size_t, V > size_t
Definition: Brigand.h:447
unsigned int initial_rto
Definition: sctp_pcb.h:361
Definition: sctp_pcb.h:62
struct sctppcbhead * sctp_ephash
Definition: sctp_pcb.h:161
Definition: sctp_pcb.h:132
void sctp_del_addr_from_vrf(uint32_t vrf_id, struct sockaddr *addr, uint32_t ifn_index, const char *if_name)
Definition: sctp_pcb.c:818
Received complete frame timestamp frame type frame size at time
Definition: plotReceiveTrace.m:7
uint32_t total_recvs
Definition: sctp_pcb.h:635
uint16_t sz
Definition: sctp_pcb.h:438
Definition: sctp_pcb.h:288
void sctp_fill_pcbinfo(struct sctp_pcbinfo *spcb)
Definition: sctp_pcb.c:148
Definition: sctp_structs.h:514
struct sctp_tcb * sctp_findassociation_addr_sa(struct sockaddr *from, struct sockaddr *to, struct sctp_inpcb **inp_p, struct sctp_nets **netp, int find_tcp_pool, uint32_t vrf_id)
Definition: sctp_pcb.c:2341
uint32_t sctp_mobility_features
Definition: sctp_pcb.h:478
struct sctp_vrf * sctp_allocate_vrf(int vrf_id)
Definition: sctp_pcb.c:212
uint32_t sctp_cmt_on_off
Definition: sctp_pcb.h:494
u_long hashasocmark
Definition: sctp_pcb.h:159
u_long sctp_hashmark
Definition: sctp_pcb.h:482
void sctp_pcb_finish(void)
Definition: sctp_pcb.c:6859
uint32_t ipi_free_strmoq
Definition: sctp_pcb.h:275
#define in6pcb
Definition: user_inpcb.h:38
int(* inp_func)(struct sctp_inpcb *, void *ptr, uint32_t val)
Definition: sctp_structs.h:111
u_long vrf_ifn_hashmark
Definition: sctp_pcb.h:185
uint32_t ipi_count_raddr
Definition: sctp_pcb.h:253
uint16_t pre_open_stream_count
Definition: sctp_pcb.h:388
Definition: user_socketvar.h:74
uint8_t asconf_supported
Definition: sctp_pcb.h:499
u_long vrf_addr_hashmark
Definition: sctp_pcb.h:70
void
Definition: AVFoundationCFSoftLinking.h:81
uint16_t rport
Definition: sctp_pcb.h:140
uint16_t flgs
Definition: sctp_pcb.h:439
uint32_t ifa_count
Definition: sctp_pcb.h:84
void(* end_func)(void *ptr, uint32_t val)
Definition: sctp_structs.h:112
int
Definition: runtests.py:53
int auto_close_time
Definition: sctp_pcb.h:408
unsigned int sctp_sack_freq
Definition: sctp_pcb.h:364
struct sctp_tcb * sctp_findassociation_ep_asconf(struct mbuf *m, int offset, struct sockaddr *dst, struct sctphdr *sh, struct sctp_inpcb **inp_p, struct sctp_nets **netp, uint32_t vrf_id)
Definition: sctp_pcb.c:2661
uint32_t localifa_flags
Definition: sctp_pcb.h:114
struct sctp_tcb * sctp_aloc_assoc(struct sctp_inpcb *inp, struct sockaddr *firstaddr, int *error, uint32_t override_tag, uint32_t vrf_id, uint16_t o_streams, uint16_t port, struct proc *p)
Definition: sctp_pcb.c:4914
Definition: sctp_uio.h:1149
struct sctp_inpcb * sctp_pcb_findep(struct sockaddr *nam, int find_tcp_pool, int have_lock, uint32_t vrf_id)
Definition: sctp_pcb.c:2250
unsigned int size_of_a_cookie
Definition: sctp_pcb.h:356
Definition: sctp_uio.h:973
uint32_t hashtblsize
Definition: sctp_pcb.h:179
int sctp_del_remote_addr(struct sctp_tcb *stcb, struct sockaddr *remaddr)
Definition: sctp_pcb.c:5253
unsigned int sctp_maxrto
Definition: sctp_pcb.h:360
Definition: user_inpcb.h:209
Definition: sctp_structs.h:746
int sctp_destination_is_reachable(struct sctp_tcb *stcb, struct sockaddr *destaddr)
Definition: sctp_pcb.c:6056
uint32_t vtag
Definition: sctp_pcb.h:435
Definition: sctp.h:58
u_long hashtcpmark
Definition: sctp_pcb.h:178
int sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, struct sctp_ifa *sctp_ifap, struct proc *p)
Definition: sctp_pcb.c:3293
TAILQ_HEAD(sctp_readhead, sctp_queued_to_read)
unsigned int sctp_minrto
Definition: sctp_pcb.h:359
char current_secret_number
Definition: sctp_pcb.h:419
void sctp_move_pcb_and_assoc(struct sctp_inpcb *old_inp, struct sctp_inpcb *new_inp, struct sctp_tcb *stcb)
Definition: sctp_pcb.c:3116
sctp_zone_t ipi_zone_asconf_ack
Definition: sctp_pcb.h:203
uint32_t vrf_id
Definition: sctp_pcb.h:115
unsigned char uint8_t
Definition: ptypes.h:89
#define SCTP_ALIGNM1
Definition: sctp_pcb.h:429
sctp_zone_t ipi_zone_strmoq
Definition: sctp_pcb.h:201
uint16_t max_open_streams_intome
Definition: sctp_pcb.h:389
uint32_t ifn_index
Definition: sctp_pcb.h:82
uint16_t fibnum
Definition: sctp_pcb.h:579
unsigned short uint16_t
Definition: ptypes.h:97
Definition: sctp_pcb.h:143
uint32_t def_cookie_life
Definition: sctp_pcb.h:406
uint32_t sctp_sws_sender
Definition: sctp_pcb.h:365
void sctp_free_ifa(struct sctp_ifa *sctp_ifap)
Definition: sctp_pcb.c:341
Definition: sctp_auth.h:76
Definition: sctp_structs.h:45
struct sctp_ifa * sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint32_t ifn_index, uint32_t ifn_type, const char *if_name, void *ifa, struct sockaddr *addr, uint32_t ifa_flags, int dynamic_add)
Definition: sctp_pcb.c:556
#define SCTP_NUM_TMRS
Definition: sctp_constants.h:545
#define SCTP_STACK_VTAG_HASH_SIZE
Definition: sctp_constants.h:959
uint32_t refcount
Definition: sctp_pcb.h:112
Definition: sctp_pcb.h:122
uint16_t lport
Definition: sctp_pcb.h:139
sctp_hmaclist_t * local_hmacs
Definition: sctp_pcb.h:373
struct sctp_ifalist * vrf_addr_hash
Definition: sctp_pcb.h:64
Definition: sctp_structs.h:848
uint32_t max_burst
Definition: sctp_pcb.h:413
uint16_t def_net_pf_threshold
Definition: sctp_pcb.h:385
Definition: sctp_structs.h:141
uint32_t sctp_context
Definition: sctp_pcb.h:491
Definition: sctp_pcb.h:352
GLboolean GLboolean GLboolean GLboolean a
Definition: gl2ext.h:306
Definition: sctp_pcb.h:614
uint16_t max_send_times
Definition: sctp_pcb.h:381
uint32_t ipi_count_strmoq
Definition: sctp_pcb.h:262
void sctp_del_local_addr_ep(struct sctp_inpcb *inp, struct sctp_ifa *ifa)
Definition: sctp_pcb.c:6273
Definition: user_mbuf.h:231
uint32_t freed_by_sorcv_sincelast
Definition: sctp_pcb.h:633
uint32_t num_v6
Definition: sctp_pcb.h:85
void sctp_delete_from_timewait(uint32_t tag, uint16_t lport, uint16_t rport)
Definition: sctp_pcb.c:5289
uint8_t inp_ip_ttl
Definition: sctp_pcb.h:527
Definition: InternalSettings.idl:27
umem_cache_t * sctp_zone_t
Definition: user_mbuf.h:81
uint32_t ipi_count_asoc
Definition: sctp_pcb.h:247
Definition: sctp_pcb.h:103
uint32_t max_cwnd
Definition: sctp_pcb.h:492
uint32_t adaptation_layer_indicator
Definition: sctp_pcb.h:410
#define SCTP_READ_LOG_SIZE
Definition: sctp_pcb.h:441
uint32_t ifn_mtu
Definition: sctp_pcb.h:80
struct sctp_tcb * sctp_findassociation_addr(struct mbuf *m, int offset, struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_chunkhdr *ch, struct sctp_inpcb **inp_p, struct sctp_nets **netp, uint32_t vrf_id)
Definition: sctp_pcb.c:2601
pthread_mutex_t userland_mutex_t
Definition: sctp_os_userspace.h:280
u_long hashvrfmark
Definition: sctp_pcb.h:182
void sctp_mark_ifa_addr_down(uint32_t vrf_id, struct sockaddr *addr, const char *if_name, uint32_t ifn_index)
Definition: sctp_pcb.c:378
sctp_zone_t ipi_zone_laddr
Definition: sctp_pcb.h:197
void * ifn_p
Definition: sctp_pcb.h:79
#define buffer
Definition: xmlparse.c:622
struct sctp_ifnlist * vrf_ifn_hash
Definition: sctp_pcb.h:184
uint32_t ipi_count_readq
Definition: sctp_pcb.h:259
struct sctp_ifnlist ifnlist
Definition: sctp_pcb.h:65
#define SCTP_HOW_MANY_SECRETS
Definition: sctp_constants.h:735
Definition: sctp_sysctl.h:44
uint32_t total_ifa_count
Definition: sctp_pcb.h:69
uint32_t total_recvs
Definition: sctp_pcb.h:586
#define SCTP_SIGNATURE_ALOC_SIZE
Definition: sctp_constants.h:311
uint32_t ipi_count_vrfs
Definition: sctp_pcb.h:265
uint32_t sctp_associd_counter
Definition: sctp_pcb.h:591
struct sctp_block_entry * block_entry
Definition: sctp_pcb.h:625
uint32_t sctp_frag_point
Definition: sctp_pcb.h:489
uint32_t num_v4
Definition: sctp_pcb.h:86
unsigned int time_of_secret_change
Definition: sctp_pcb.h:353
struct sctp_ifa * ifa
Definition: sctp_pcb.h:124
int sctp_is_vtag_good(uint32_t tag, uint16_t lport, uint16_t rport, struct timeval *now)
Definition: sctp_pcb.c:7803
struct sctp_vrflist * sctp_vrfhash
Definition: sctp_pcb.h:181
void sctp_remove_net(struct sctp_tcb *stcb, struct sctp_nets *net)
Definition: sctp_pcb.c:5194
Definition: sctp_pcb.h:136
int freed_from_where
Definition: sctp_pcb.h:636
struct socket * sctp_socket
Definition: sctp_pcb.h:475
struct sctp_tcb * sctp_findassociation_ep_asocid(struct sctp_inpcb *inp, sctp_assoc_t asoc_id, int want_lock)
Definition: sctp_pcb.c:1877
struct sctp_base_info system_base_info
Definition: sctp_pcb.c:86
Definition: sctp_uio.h:210
uint32_t sctp_default_cc_module
Definition: sctp_pcb.h:368
void(* asoc_func)(struct sctp_inpcb *, struct sctp_tcb *, void *ptr, uint32_t val)
Definition: sctp_structs.h:109
Definition: sctp_os_userspace.h:427
struct sctp_vrf * sctp_find_vrf(uint32_t vrf_id)
Definition: sctp_pcb.c:283
void sctp_clean_up_stream(struct sctp_tcb *stcb, struct sctp_readhead *rh)
Definition: sctp_pcb.c:5413
uint32_t v_tag
Definition: sctp_pcb.h:138
GLboolean GLboolean GLboolean b
Definition: gl2ext.h:306
u_long hashmark
Definition: sctp_pcb.h:162
void * ifa
Definition: sctp_pcb.h:107
uint32_t ipi_count_ifns
Definition: sctp_pcb.h:268
sctp_zone_t ipi_zone_chunk
Definition: sctp_pcb.h:199
uint8_t first_time
Definition: sctp_pcb.h:299
uint32_t fr_max_burst
Definition: sctp_pcb.h:414
uint32_t ipi_free_chunks
Definition: sctp_pcb.h:274
uint32_t registered_af
Definition: sctp_pcb.h:87
uint32_t ipi_count_chunk
Definition: sctp_pcb.h:256
uint8_t auth_supported
Definition: sctp_pcb.h:497
uint32_t store_at
Definition: sctp_pcb.h:412
struct sctp_nets * sctp_findnet(struct sctp_tcb *stcb, struct sockaddr *addr)
Definition: sctp_pcb.c:4387
uint32_t sctp_assoc_t
Definition: sctp_uio.h:65
#define SCTP_NUMBER_IN_VTAG_BLOCK
Definition: sctp_constants.h:952
uint8_t src_is_glob
Definition: sctp_pcb.h:118
uint8_t adaptation_layer_indicator_provided
Definition: sctp_pcb.h:411
Definition: sctp_pcb.h:74
uint8_t inp_vflag
Definition: sctp_pcb.h:525
uint8_t nrsack_supported
Definition: sctp_pcb.h:501
struct sctp_tcb * sctp_findassociation_ep_addr(struct sctp_inpcb **inp_p, struct sockaddr *remote, struct sctp_nets **netp, struct sockaddr *local, struct sctp_tcb *locked_tcb)
Definition: sctp_pcb.c:1467
uint8_t prsctp_supported
Definition: sctp_pcb.h:496
uint32_t ifn_type
Definition: sctp_pcb.h:81
int sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m, int offset, int limit, struct sockaddr *src, struct sockaddr *dst, struct sockaddr *altsa, uint16_t port)
Definition: sctp_pcb.c:7094
sctp_zone_t ipi_zone_asoc
Definition: sctp_pcb.h:196
uint8_t ecn_supported
Definition: sctp_pcb.h:495
uint32_t initial_sequence_debug
Definition: sctp_pcb.h:409
Definition: sctp_uio.h:307
struct mbuf * control
Definition: sctp_pcb.h:517
uint32_t random_counter
Definition: sctp_pcb.h:392
uint32_t sctp_sws_receiver
Definition: sctp_pcb.h:366
struct sctp_iterator * inp_starting_point_for_iterator
Definition: sctp_pcb.h:488
#define SCTP_NUMBER_OF_SECRETS
Definition: sctp_constants.h:737
struct sctpasochead * sctp_asocidhash
Definition: sctp_pcb.h:589
void sctp_mark_ifa_addr_up(uint32_t vrf_id, struct sockaddr *addr, const char *if_name, uint32_t ifn_index)
Definition: sctp_pcb.c:422
uint32_t sctp_flags
Definition: sctp_pcb.h:477
sctp_zone_t ipi_zone_net
Definition: sctp_pcb.h:198
LIST_ENTRY(sctp_vrf) next_vrf
u_long hashasocidmark
Definition: sctp_pcb.h:590
uint8_t inp_ip_resv
Definition: sctp_pcb.h:529
uint16_t def_net_failure
Definition: sctp_pcb.h:383
struct sctpasochead * sctp_tcbhash
Definition: sctp_pcb.h:481
GLuint GLsizei GLsizei * length
Definition: gl2.h:435
int sctp_swap_inpcb_for_listen(struct sctp_inpcb *inp)
Definition: sctp_pcb.c:2198
uint8_t reconfig_supported
Definition: sctp_pcb.h:500
uint32_t refcount
Definition: sctp_pcb.h:83
struct sctp_inpcb * sctp_ep
Definition: sctp_pcb.h:616
struct mbuf * pkt_last
Definition: sctp_pcb.h:516
uint32_t total_sends
Definition: sctp_pcb.h:634
uint8_t resv
Definition: sctp_pcb.h:119
Definition: sctp.h:69
uint8_t pktdrop_supported
Definition: sctp_pcb.h:502
struct socket * sctp_socket
Definition: sctp_pcb.h:615
void sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from)
Definition: sctp_pcb.c:3907
uint8_t default_dscp
Definition: sctp_pcb.h:418